From: Lin Ming <ming.m.lin@intel.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Jens Axboe <axboe@kernel.dk>,
Kernel development list <linux-kernel@vger.kernel.org>,
Linux-pm mailing list <linux-pm@vger.kernel.org>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: [RFC PATCH 1/3] block: add a flag to identify PM request
Date: Tue, 15 May 2012 23:58:53 +0800 [thread overview]
Message-ID: <1337097533.3515.17.camel@chief-river-32> (raw)
In-Reply-To: <20120515163734.332f3e08@pyramind.ukuu.org.uk>
On Tue, 2012-05-15 at 16:37 +0100, Alan Cox wrote:
> On Tue, 15 May 2012 23:33:05 +0800
> Lin Ming <ming.m.lin@intel.com> wrote:
>
> > On Tue, 2012-05-15 at 10:35 -0400, Alan Stern wrote:
> > > On Tue, 15 May 2012, Lin Ming wrote:
> > >
> > > > Add a flag REQ_PM to identify the request is PM related.
> > > > As an example, modify scsi code to use this flag.
> > >
> > > There already is such a flag; you don't need to add one. In fact,
> > > there already are _two_ such flags, and it would be best to remove one
> > > of them. In include/linux/blkdev.h:
> > >
> > > REQ_TYPE_PM_SUSPEND, /* suspend request */
> > > REQ_TYPE_PM_RESUME, /* resume request */
> > >
> > > Apparently they had been used by the old ide driver, but they don't
> > > seem to be used anywhere now.
> >
> > IDE code still uses both types and they are used for system
> > suspend/resume. See generic_ide_suspend and generic_ide_resume.
>
> drivers/ide is obsolete code though so we shouldn't be forcing its needs
> on the future
Do you mean we don't care about breaking ide code?
struct request {
....
unsigned int cmd_flags;
enum rq_cmd_type_bits cmd_type;
Another reason I didn't reuse REQ_TYPE_PM_SUSPEND/REQ_TYPE_PM_RESUME is
because all scsi requests set the cmd_type to REQ_TYPE_BLOCK_PC.
So I think we should add a new cmd_flags(REQ_PM) to tell if it's a
runtime pm request.
Thanks.
next prev parent reply other threads:[~2012-05-15 15:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-15 8:48 [RFC PATCH 0/3] block layer runtime pm Lin Ming
2012-05-15 8:48 ` [RFC PATCH 1/3] block: add a flag to identify PM request Lin Ming
2012-05-15 14:35 ` Alan Stern
2012-05-15 15:33 ` Lin Ming
2012-05-15 15:37 ` Alan Cox
2012-05-15 15:58 ` Lin Ming [this message]
2012-05-15 18:30 ` Alan Stern
2012-05-15 16:03 ` Alan Stern
2012-05-15 8:48 ` [RFC PATCH 2/3] block: add queue runtime pm callback Lin Ming
2012-05-15 14:37 ` Alan Stern
2012-05-15 15:36 ` Lin Ming
2012-05-15 8:48 ` [RFC PATCH 3/3] block: add queue idle timer Lin Ming
2012-05-15 14:39 ` Alan Stern
2012-05-15 15:49 ` Lin Ming
2012-05-15 19:19 ` Jeff Moyer
2012-05-16 1:27 ` Lin Ming
2012-05-16 13:04 ` Jeff Moyer
2012-05-16 13:53 ` Jens Axboe
2012-05-16 14:28 ` Alan Stern
2012-05-16 15:40 ` Lin Ming
2012-05-16 15:59 ` Alan Stern
2012-05-16 16:12 ` Lin Ming
2012-05-16 18:29 ` 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=1337097533.3515.17.camel@chief-river-32 \
--to=ming.m.lin@intel.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--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