From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "ming.lei@redhat.com" <ming.lei@redhat.com>
Cc: "hch@lst.de" <hch@lst.de>,
"jthumshirn@suse.de" <jthumshirn@suse.de>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"axboe@kernel.dk" <axboe@kernel.dk>,
"jianchao.w.wang@oracle.com" <jianchao.w.wang@oracle.com>
Subject: Re: [PATCH v3 5/9] block, scsi: Rework runtime power management
Date: Fri, 3 Aug 2018 16:16:21 +0000 [thread overview]
Message-ID: <a8bcea80d535fd59db9ee8d1576301ef1aefa296.camel@wdc.com> (raw)
In-Reply-To: <20180802235027.GA16047@ming.t460p>
On Fri, 2018-08-03 at 07:50 +0800, Ming Lei wrote:
> I am not sure if using PREEMPT_ONLY can work well for runtime PM,=
there
> are lots of users which depends on blk_freeze_queue() for mak=
ing sure
> there isn't any in-flight requests.
Please elaborate "lots of other users". The only use I have found i=
n the
kernel tree of that flag of which I think that it is not related to power
management is in ide_prep_sense(). All other uses of the RQF_PR=
EEMPT /
BLK_MQ_REQ_PREEMPT / QUEUE_FLAG_PREEMPT_ONLY flags =
I found are IMHO related
to power management:
* generic_ide_resume()
* __scsi_execute()
* scsi_device_quiesce() / scsi_device_resume()
However, we may have to modify __scsi_execute() such that only re=
quests
that are related to power management are submitted with the
BLK_MQ_REQ_PREEMPT flag set. I don't think that all __scs=
i_execute() callers
need that flag.
> But now PREEMPT_ONLY opens one door for preempt-req during the bi=
g
> window, so this way may break current uses of blk_freeze_queu=
e().
The power management core serializes runtime power management against suspe=
nd,
resume and hibernation so I think it is safe to use the PREEMPT_ONLY fl=
ag for
runtime power management although it is already used for suspend, resume an=
d
hibernation.
Bart.
next prev parent reply other threads:[~2018-08-03 16:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 18:29 [PATCH v3 0/9] blk-mq: Enable runtime power management Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 1/9] block: Fix a comment in a header file Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 2/9] block: Move power management functions into new source files Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 3/9] block: Serialize queue freezing and blk_pre_runtime_suspend() Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 4/9] percpu-refcount: Introduce percpu_ref_read() Bart Van Assche
2018-08-02 19:06 ` Tejun Heo
2018-08-02 20:04 ` Bart Van Assche
2018-08-06 17:18 ` Tejun Heo
2018-08-06 17:28 ` Bart Van Assche
2018-08-07 22:53 ` Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 5/9] block, scsi: Rework runtime power management Bart Van Assche
2018-08-02 23:50 ` Ming Lei
2018-08-03 16:16 ` Bart Van Assche [this message]
2018-08-02 18:29 ` [PATCH v3 6/9] block: Warn if pm_runtime_get*() has not been called Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 7/9] block: Remove blk_pm_requeue_request() Bart Van Assche
2018-08-02 18:29 ` [PATCH v3 8/9] blk-mq: Insert blk_pm_{add,put}_request() calls Bart Van Assche
2018-08-02 23:53 ` Ming Lei
2018-08-03 0:08 ` Bart Van Assche
2018-08-03 0:11 ` Ming Lei
2018-08-03 1:03 ` Bart Van Assche
2018-08-03 1:11 ` Ming Lei
2018-08-02 18:29 ` [PATCH v3 9/9] blk-mq: Enable support for runtime power management Bart Van Assche
2018-08-02 21:25 ` [PATCH v3 0/9] blk-mq: Enable " Jens Axboe
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=a8bcea80d535fd59db9ee8d1576301ef1aefa296.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jianchao.w.wang@oracle.com \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=ming.lei@redhat.com \
--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