[PATCH V3 1/4] blk-mq: serialize queue quiesce and unquiesce by mutex

Hannes Reinecke hare at suse.de
Tue Sep 8 04:38:31 EDT 2020


On 9/8/20 10:15 AM, Ming Lei wrote:
> Add .mq_quiesce_mutext to request queue, so that queue quiesce and
> unquiesce can be serialized. Meantime we can avoid unnecessary
> synchronize_rcu() in case that queue has been quiesced already.
> 
> Prepare for replace SRCU with percpu-refcount, so that we can avoid
> warning in percpu_ref_kill_and_confirm() in case that blk_mq_quiesce_queue()
> is run on already-quiesced request queue.
> 
> Signed-off-by: Ming Lei <ming.lei at redhat.com>
> Cc: Sagi Grimberg <sagi at grimberg.me>
> Cc: Bart Van Assche <bvanassche at acm.org>
> Cc: Johannes Thumshirn <Johannes.Thumshirn at wdc.com>
> Cc: Chao Leng <lengchao at huawei.com>
> Signed-off-by: Ming Lei <ming.lei at redhat.com>
> ---
>  block/blk-core.c       |  2 ++
>  block/blk-mq.c         | 11 +++++++++++
>  include/linux/blkdev.h |  2 ++
>  3 files changed, 15 insertions(+)
> I was wondering if we couldn't make do with a simple test_and_set_bit()
/ test_and_clear_bit(), but that can also be done in a later patch,
seeing that this is a worthwhile improvement. So:

Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare at suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer



More information about the Linux-nvme mailing list