From: Ming Lei <ming.lei@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Subject: Re: [PATCH V3 00/17] SCSI: introduce per-host admin queue & enable runtime PM
Date: Mon, 17 Sep 2018 19:55:53 +0800 [thread overview]
Message-ID: <20180917115551.GB28349@ming.t460p> (raw)
In-Reply-To: <5b608035-1100-2cf3-e9f9-47a513267123@suse.de>
On Mon, Sep 17, 2018 at 08:34:09AM +0200, Hannes Reinecke wrote:
> On 09/13/2018 02:15 PM, Ming Lei wrote:
> > Hi,
> >
> > This patchset introduces per-host admin request queue for submitting
> > admin request only, and uses this approach to implement both SCSI
> > quiesce and runtime PM in one very simply way. Also runtime PM deadlock
> > can be avoided in case that request pool is used up, such as when too
> > many IO requests are allocated before resuming device.
> >
> > The idea is borrowed from NVMe.
> >
> > In this patchset, admin request(all requests submitted via __scsi_execute) will
> > be submitted via one per-host admin queue, and the request is still
> > associated with the same scsi_device as before, and respects this
> > scsi_device's all kinds of limits too. Admin queue shares host tags with
> > other IO queues.
> >
> > One core idea is that for any admin request submitted from this admin queue,
> > this request won't be called back to block layer via the associated IO
> > queue(scsi_device). And this is done in the 3rd patch. So once IO queue
> > is frozen, it can be observed as really frozen from block layer view.
> >
> > SCSI quiesce is implemented by admin queue in very simple way, see patch
> > 15.
> >
> > Also runtime PM for legacy path is simplified too, see patch 16, and device
> > resume is moved to blk_queue_enter().
> >
> > blk-mq simply follows legacy's approach for supporting runtime PM.
> >
> > Also the fast IO path is simplified much, see blk_queue_enter().
> >
> [ .. ]
> >
> Please don't do this.
> Having an admin queue makes sense for NVMe (where it's even part of the
> spec). But for SCSI it's just an additional logical construct with
> doesn't correlate to anything we have in the lower layers.
It is an abstract in concept or software, and there can be the real hw
admin queue or not. What matters is that the PM or admin request is handled
differently with normal IO in reality.
>
> And all of this just to handle PM requests properly.
The PM request can be handled easily, one big improvement is that this
way can simplify IO path if admin request is separated from normal IO handling.
>
> At ALPSS we've discussed this issue and came up with a different
> proposal: Allocate a PM request before _suspending_. Then we trivially
> have that request available when resuming, and are sure that nothing can
> block the request.
Seems this way is only for avoiding deadlock during resume, which is
just a small part of the problem. The big part is to support runtime PM
in an easy/simple way.
Still better to talk with code.
> Far simpler, and doesn't require an entirely new infrastructure.
It is just a new admin queue, not sure it can be called as new infrastructure, :-)
Thanks,
Ming
prev parent reply other threads:[~2018-09-17 11:55 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 12:15 [PATCH V3 00/17] SCSI: introduce per-host admin queue & enable runtime PM Ming Lei
2018-09-13 12:15 ` [PATCH V3 01/17] blk-mq: allow to pass default queue flags for creating & initializing queue Ming Lei
2018-09-13 12:15 ` [PATCH V3 02/17] blk-mq: convert BLK_MQ_F_NO_SCHED into per-queue flag Ming Lei
2018-09-13 12:15 ` [PATCH V3 03/17] block: rename QUEUE_FLAG_NO_SCHED as QUEUE_FLAG_ADMIN Ming Lei
2018-09-13 12:15 ` [PATCH V3 04/17] blk-mq: don't reserve tags for admin queue Ming Lei
2018-09-13 12:15 ` [PATCH V3 05/17] SCSI: try to retrieve request_queue via 'scsi_cmnd' if possible Ming Lei
2018-09-13 12:15 ` [PATCH V3 06/17] SCSI: pass 'scsi_device' instance from 'scsi_request' Ming Lei
2018-09-13 12:15 ` [PATCH V3 07/17] SCSI: prepare for introducing admin queue for legacy path Ming Lei
2018-09-13 12:15 ` [PATCH V3 08/17] SCSI: pass scsi_device to scsi_mq_prep_fn Ming Lei
2018-09-13 12:15 ` [PATCH V3 09/17] SCSI: don't set .queuedata in scsi_mq_alloc_queue() Ming Lei
2018-09-13 12:15 ` [PATCH V3 10/17] SCSI: deal with admin queue busy Ming Lei
2018-09-13 12:15 ` [PATCH V3 11/17] SCSI: track pending admin commands Ming Lei
2018-09-14 3:33 ` jianchao.wang
2018-09-14 11:33 ` Ming Lei
2018-09-17 2:46 ` jianchao.wang
2018-09-17 11:35 ` Ming Lei
2018-09-18 1:22 ` jianchao.wang
2018-09-18 7:39 ` Ming Lei
2018-09-18 7:51 ` jianchao.wang
2018-09-18 7:55 ` Ming Lei
2018-09-18 8:25 ` jianchao.wang
2018-09-18 12:15 ` Ming Lei
2018-09-19 3:52 ` jianchao.wang
2018-09-19 8:07 ` Ming Lei
2018-09-13 12:15 ` [PATCH V3 12/17] SCSI: create admin queue for each host Ming Lei
2018-09-13 12:15 ` [PATCH V3 13/17] SCSI: use the dedicated admin queue to send admin commands Ming Lei
2018-09-13 12:15 ` [PATCH V3 14/17] SCSI: transport_spi: resume a quiesced device Ming Lei
2018-09-13 12:15 ` [PATCH V3 15/17] SCSI: use admin queue to implement queue QUIESCE Ming Lei
2018-09-13 12:15 ` [PATCH V3 16/17] block: simplify runtime PM support Ming Lei
2018-09-13 12:15 ` [PATCH V3 17/17] block: enable runtime PM for blk-mq Ming Lei
2018-09-14 10:33 ` kbuild test robot
2018-09-15 1:13 ` kbuild test robot
2018-09-14 7:27 ` [PATCH V3 00/17] SCSI: introduce per-host admin queue & enable runtime PM jianchao.wang
2018-09-16 13:09 ` Ming Lei
2018-09-17 2:25 ` jianchao.wang
2018-09-17 12:07 ` Ming Lei
2018-09-18 1:17 ` jianchao.wang
2018-09-18 7:42 ` Ming Lei
2018-09-18 7:53 ` jianchao.wang
2018-09-17 6:34 ` Hannes Reinecke
2018-09-17 11:55 ` 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=20180917115551.GB28349@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=linux-block@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).