]> Git Repo - linux.git/commit
blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()
authorMing Lei <[email protected]>
Mon, 25 Jun 2018 11:31:49 +0000 (19:31 +0800)
committerJens Axboe <[email protected]>
Mon, 9 Jul 2018 15:07:52 +0000 (09:07 -0600)
commit1311326cf4755c7ffefd20f576144ecf46d9906b
tree9f973618b2b1d61520c37a16dbb1d27399f48632
parent97889f9ac24f8d2fc8e703ea7f80c162bab10d4d
blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()

SCSI probing may synchronously create and destroy a lot of request_queues
for non-existent devices. Any synchronize_rcu() in queue creation or
destroy path may introduce long latency during booting, see detailed
description in comment of blk_register_queue().

This patch removes one synchronize_rcu() inside blk_cleanup_queue()
for this case, commit c2856ae2f315d75(blk-mq: quiesce queue before freeing queue)
needs synchronize_rcu() for implementing blk_mq_quiesce_queue(), but
when queue isn't initialized, it isn't necessary to do that since
only pass-through requests are involved, no original issue in
scsi_execute() at all.

Without this patch and previous one, it may take more 20+ seconds for
virtio-scsi to complete disk probe. With the two patches, the time becomes
less than 100ms.

Fixes: c2856ae2f315d75 ("blk-mq: quiesce queue before freeing queue")
Reported-by: Andrew Jones <[email protected]>
Cc: Omar Sandoval <[email protected]>
Cc: Bart Van Assche <[email protected]>
Cc: [email protected]
Cc: "Martin K. Petersen" <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Tested-by: Andrew Jones <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
block/blk-core.c
This page took 0.049631 seconds and 4 git commands to generate.