From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Andrew Jones <drjones@redhat.com>,
linux-scsi@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] blk-mq: avoid to synchronize rcu inside blk_cleanup_queue()
Date: Sat, 23 Jun 2018 05:33:35 +0800 [thread overview]
Message-ID: <20180622213333.GB2949@ming.t460p> (raw)
In-Reply-To: <86ef306e-e16a-dba5-29b8-469d92eec9f4@kernel.dk>
On Fri, Jun 22, 2018 at 08:47:35AM -0600, Jens Axboe wrote:
> On 6/19/18 8:55 PM, Ming Lei wrote:
> > 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 two synchronize_rcu() inside blk_cleanup_queue()
> > for this case:
> >
> > 1) commit c2856ae2f315d75(blk-mq: quiesce queue before freeing queue)
> > need 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.
> >
> > 2) when only one request queue is attached to tags, no necessary to
> > call synchronize_rcu() too.
> >
> > Without this patch, it may take more 20+ seconds for virtio-scsi to
> > complete disk probe. With this patch, the time becomes less than 100ms.
>
> Looks reasonable to me. But this is something that we've been breaking
> multiple times over the years, any chance you could add a blktests
> test for it?
Looks a good idea, I guess it can be triggered on scsi_debug too, will cook
a patch later.
thanks,
Ming
prev parent reply other threads:[~2018-06-22 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-20 2:55 [PATCH] blk-mq: avoid to synchronize rcu inside blk_cleanup_queue() Ming Lei
2018-06-22 11:42 ` Andrew Jones
2018-06-22 14:58 ` Jens Axboe
2018-06-22 21:31 ` Ming Lei
2018-06-22 22:00 ` Jens Axboe
2018-06-22 14:47 ` Jens Axboe
2018-06-22 21:33 ` Ming Lei [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180622213333.GB2949@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=drjones@redhat.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox