]> www.infradead.org Git - users/jedix/linux-maple.git/commit
blk-mq: avoid excessive boot delays with large lun counts
authorJeff Moyer <jmoyer@redhat.com>
Tue, 10 Nov 2015 22:22:59 +0000 (14:22 -0800)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Fri, 13 Nov 2015 17:23:50 +0000 (09:23 -0800)
commit09d1400b056bec68295fbff3beb7ec9b7d56ec8c
treee29f594b0da54149b35b0127573329d5cee134eb
parent6edf9874308e388260d0214a152a85909565ccb8
blk-mq: avoid excessive boot delays with large lun counts

Zhangqing Luo reported long boot times on a system with thousands of
LUNs when scsi-mq was enabled.  He narrowed the problem down to
blk_mq_add_queue_tag_set, where every queue is frozen in order to set
the BLK_MQ_F_TAG_SHARED flag.  Each added device will freeze all queues
added before it in sequence, which involves waiting for an RCU grace
period for each one.  We don't need to do this.  After the second queue
is added, only new queues need to be initialized with the shared tag.
We can do that by percolating the flag up to the blk_mq_tag_set, and
updating the newly added queue's hctxs if the flag is set.

This problem was introduced by commit 0d2602ca30e41 (blk-mq: improve
support for shared tags maps).

Reported-and-tested-by: Jason Luo <zhangqing.luo@oracle.com>
Reviewed-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 2404e607a9ee36db361bebe32787dafa1f7d6c00)

Orabug: 21879600
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
block/blk-mq.c