]> git.hungrycats.org Git - linux/commit
blk-mq: Make blk_mq_quiesce_tagset() hold the tag list mutex less long
authorBart Van Assche <bvanassche@acm.org>
Tue, 22 Oct 2024 18:16:17 +0000 (11:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:21 +0000 (13:54 +0100)
commit20ff0fe1c8a23a0a7b1751033e62737a5b64f20e
tree432bb5f5ee3269924dfc9400f6b5c554069ecd5c
parentaaab132bb2bf97bdd5c73c87c23c1340fbed1477
blk-mq: Make blk_mq_quiesce_tagset() hold the tag list mutex less long

commit ccd9e252c515ac5a3ed04a414c95d1307d17f159 upstream.

Make sure that the tag_list_lock mutex is not held any longer than
necessary. This change reduces latency if e.g. blk_mq_quiesce_tagset()
is called concurrently from more than one thread. This function is used
by the NVMe core and also by the UFS driver.

Reported-by: Peter Wang <peter.wang@mediatek.com>
Cc: Chao Leng <lengchao@huawei.com>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 414dd48e882c ("blk-mq: add tagset quiesce interface")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20241022181617.2716173-1-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-mq.c