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

Hannes Reinecke
2020-09-08T08:38:40Z

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@redhat.com>
> Cc: Sagi Grimberg <sagi@grimberg.me>
> Cc: Bart Van Assche <bvanassche@acm.org>
> Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
> Cc: Chao Leng <lengchao@huawei.com>
> Signed-off-by: Ming Lei <ming.lei@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@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@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