• Ming Lei's avatar
    blk-mq: avoid to synchronize rcu inside blk_cleanup_queue() · bbcdd751
    Ming Lei authored
    [ Upstream commit 1311326c ]
    
    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 c2856ae2(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: c2856ae2 ("blk-mq: quiesce queue before freeing queue")
    Reported-by: 's avatarAndrew Jones <drjones@redhat.com>
    Cc: Omar Sandoval <osandov@fb.com>
    Cc: Bart Van Assche <bart.vanassche@wdc.com>
    Cc: linux-scsi@vger.kernel.org
    Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Tested-by: 's avatarAndrew Jones <drjones@redhat.com>
    Signed-off-by: 's avatarMing Lei <ming.lei@redhat.com>
    Signed-off-by: 's avatarJens Axboe <axboe@kernel.dk>
    Signed-off-by: 's avatarSasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    bbcdd751
Name
Last commit
Last update
..
partitions Loading commit data...
Kconfig Loading commit data...
Kconfig.iosched Loading commit data...
Makefile Loading commit data...
badblocks.c Loading commit data...
bfq-cgroup.c Loading commit data...
bfq-iosched.c Loading commit data...
bfq-iosched.h Loading commit data...
bfq-wf2q.c Loading commit data...
bio-integrity.c Loading commit data...
bio.c Loading commit data...
blk-cgroup.c Loading commit data...
blk-core.c Loading commit data...
blk-exec.c Loading commit data...
blk-flush.c Loading commit data...
blk-integrity.c Loading commit data...
blk-ioc.c Loading commit data...
blk-lib.c Loading commit data...
blk-map.c Loading commit data...
blk-merge.c Loading commit data...
blk-mq-cpumap.c Loading commit data...
blk-mq-debugfs.c Loading commit data...
blk-mq-debugfs.h Loading commit data...
blk-mq-pci.c Loading commit data...
blk-mq-rdma.c Loading commit data...
blk-mq-sched.c Loading commit data...
blk-mq-sched.h Loading commit data...
blk-mq-sysfs.c Loading commit data...
blk-mq-tag.c Loading commit data...
blk-mq-tag.h Loading commit data...
blk-mq-virtio.c Loading commit data...
blk-mq.c Loading commit data...
blk-mq.h Loading commit data...
blk-settings.c Loading commit data...
blk-softirq.c Loading commit data...
blk-stat.c Loading commit data...
blk-stat.h Loading commit data...
blk-sysfs.c Loading commit data...
blk-tag.c Loading commit data...
blk-throttle.c Loading commit data...
blk-timeout.c Loading commit data...
blk-wbt.c Loading commit data...
blk-wbt.h Loading commit data...
blk-zoned.c Loading commit data...
blk.h Loading commit data...
bounce.c Loading commit data...
bsg-lib.c Loading commit data...
bsg.c Loading commit data...
cfq-iosched.c Loading commit data...
cmdline-parser.c Loading commit data...
compat_ioctl.c Loading commit data...
deadline-iosched.c Loading commit data...
elevator.c Loading commit data...
genhd.c Loading commit data...
ioctl.c Loading commit data...
ioprio.c Loading commit data...
kyber-iosched.c Loading commit data...
mq-deadline.c Loading commit data...
noop-iosched.c Loading commit data...
opal_proto.h Loading commit data...
partition-generic.c Loading commit data...
scsi_ioctl.c Loading commit data...
sed-opal.c Loading commit data...
t10-pi.c Loading commit data...