Re: [PATCH] block: drain queue before waiting for q_usage_counter becoming zero

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

 



On Wed, 2017-11-22 at 13:11 +0800, Ming Lei wrote:
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 11097477eeab..3d3797327491 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -161,6 +161,8 @@ void blk_freeze_queue(struct request_queue *q)
>  	 * exported to drivers as the only user for unfreeze is blk_mq.
>  	 */
>  	blk_freeze_queue_start(q);
> +	if (!q->mq_ops)
> +		blk_drain_queue(q);
>  	blk_mq_freeze_queue_wait(q);
>  }

Since q_usage_counter now tracks legacy requests, is there any reason why we
still need __blk_drain_queue()? Have you considered to eliminate
__blk_drain_queue() and to call blk_run_queue() from inside blk_freeze_queue()
instead of calling blk_drain_queue()? I'm asking this because
blk_mq_freeze_queue_wait() uses a more efficient mechanism (wait_event())
than __blk_drain_queue() (while (...) msleep(10)).

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