From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Alan Stern <stern@rowland.harvard.edu>,
linux-pm@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bart Van Assche <bart.vanassche@wdc.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH RFC 4/4] scsi_mq: enable runtime PM
Date: Thu, 12 Jul 2018 09:36:49 +0800 [thread overview]
Message-ID: <20180712013642.GA15593@ming.t460p> (raw)
In-Reply-To: <20180711171409.GC3500@lst.de>
Hi Christoph,
On Wed, Jul 11, 2018 at 07:14:09PM +0200, Christoph Hellwig wrote:
> > @@ -3770,7 +3770,7 @@ EXPORT_SYMBOL(blk_finish_plug);
> > void blk_pm_runtime_init(struct request_queue *q, struct device *dev)
> > {
> > /* not support for RQF_PM and ->rpm_status in blk-mq yet */
> > - if (q->mq_ops)
> > + if (q->mq_ops && !(q->tag_set->flags & BLK_MQ_F_SUPPORT_RPM))
> > return;
> >
> > q->dev = dev;
>
> This should go into a block layer patch, not a scsi one.
OK.
>
> > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> > index 41e9ac9fc138..fa4667aa4732 100644
> > --- a/drivers/scsi/scsi_lib.c
> > +++ b/drivers/scsi/scsi_lib.c
> > @@ -2306,7 +2306,8 @@ int scsi_mq_setup_tags(struct Scsi_Host *shost)
> > shost->tag_set.queue_depth = shost->can_queue;
> > shost->tag_set.cmd_size = cmd_size;
> > shost->tag_set.numa_node = NUMA_NO_NODE;
> > - shost->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_SG_MERGE;
> > + shost->tag_set.flags = BLK_MQ_F_SHOULD_MERGE |
> > + BLK_MQ_F_SG_MERGE | BLK_MQ_F_SUPPORT_RPM;
>
> As far as I can tell only ufs and libata support runtime PM, so
> we should probably only enable it for those.
For legacy path, blk_pm_runtime_init() is always run for all SCSI devices,
and this patch just follows the old way, so that we can keep runtime PM
behaviour not changed from user view. That means if we want to only enable
for ufs & libata, it should be in another standalone patch, instead of
this one.
I will address all your other comments and Alan's in V2.
Thanks,
Ming
next prev parent reply other threads:[~2018-07-12 1:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 16:29 [PATCH RFC 0/4] blk-mq: support runtime PM Ming Lei
2018-07-11 16:29 ` [PATCH RFC 1/4] blk-mq: introduce blk_mq_support_runtime_pm() Ming Lei
2018-07-11 17:10 ` Christoph Hellwig
2018-07-11 16:29 ` [PATCH RFC 2/4] blk-mq: introduce blk_mq_pm_queue_idle() Ming Lei
2018-07-11 17:11 ` Christoph Hellwig
2018-07-11 16:29 ` [PATCH RFC 3/4] blk-mq: prepare for supporting runtime PM Ming Lei
2018-07-11 17:19 ` Christoph Hellwig
2018-07-12 9:58 ` Ming Lei
2018-07-12 12:28 ` Ming Lei
2018-07-12 14:00 ` Jens Axboe
2018-07-12 21:32 ` Ming Lei
2018-07-12 21:44 ` Jens Axboe
2018-07-12 23:15 ` Ming Lei
2018-07-13 14:20 ` Jens Axboe
2018-07-13 20:27 ` Alan Stern
2018-07-13 20:39 ` Jens Axboe
2018-07-13 22:47 ` Ming Lei
2018-07-11 16:29 ` [PATCH RFC 4/4] scsi_mq: enable " Ming Lei
2018-07-11 17:14 ` Christoph Hellwig
2018-07-12 1:36 ` Ming Lei [this message]
2018-07-12 7:17 ` Christoph Hellwig
2018-07-12 12:21 ` Ming Lei
2018-07-11 17:28 ` Alan Stern
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=20180712013642.GA15593@ming.t460p \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=rjw@rjwysocki.net \
--cc=stern@rowland.harvard.edu \
/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).