Thread (9 messages) 9 messages, 5 authors, 2021-11-10

Re: sorting out the freeze / quiesce mess

From: Ming Lei <hidden>
Date: 2021-11-10 10:46:10
Also in: linux-nvme, linux-scsi

On Wed, Nov 10, 2021 at 11:22:05AM +0100, Hannes Reinecke wrote:
On 11/10/21 10:14 AM, Christoph Hellwig wrote:
quoted
Hi Jens and Ming,

I've been looking into properly supporting queue freezing for bio based
drivers (that is only release q_usage_counter on bio completion for them).
And the deeper I look into the code the more I'm confused by us having
the blk_mq_quiesce* interface in addition to blk_freeze_queue.  What
is a good reason to do a quiesce separately from a freeze?
IIRC the 'quiesce' interface was an abstraction from the SCSI 'quiesce'
operation, where we had to stop all I/O except for TMFs and scanning.
And 'freeze' was designed fro stopping all I/O.

But I'm not sure if that ever was the distinction, or if it still
applies today.

And yeah, I've been wondering myself.

Probably we should just kill the 'quiesce' stuff and see where we end up :-)
In case of EH, no queued requests can be completed, however driver still
needs to stop queue and reset hardware, then how can you use freeze to stop
queue? See nvme_dev_disable().

Freeze can stop to allocate new request and drain all queued requests, but
it can't prevent IO from being queued to LLD. On the contrary,
blk_mq_freeze_queue_wait() requires LLD to handle IO for moving on,
otherwise it will wait forever.

Thanks,
Ming
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help