Re: [PATCH 2/8] block: Do not run frozen queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/2/25 6:15 PM, Yu Kuai wrote:
Just a question, blk_mq_quiesce_queue also calls synchronize_rcu() to
wait for inflight dispatch work to be done, is it safe in following
patches? I think it's not, dispatch work can be running while there is
no request pending, menas queue can be frozen with active dispatch work.

No work is dispatched if a queue is frozen because freezing a queue only
finishes after q_usage_counter drops to zero. queue_rq() and queue_rqs()
are only called if one or more requests are being executed.
q_usage_counter is increased when a request is allocated and decreased
when a request is freed. Hence, q_usage_counter cannot be zero while
queue_rq() or queue_rqs() is in progress. Hence, neither queue_rq() nor
queue_rqs() are called while q_usage_counter is zero.

Thanks,

Bart.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux