From: huang ying <huang.ying.caritas@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Zhang Rui <rui.zhang@intel.com>,
Alan Stern <stern@rowland.harvard.edu>,
Lin Ming <ming.m.lin@intel.com>, Jeff Garzik <jgarzik@pobox.com>,
Tejun Heo <tj@kernel.org>, Len Brown <lenb@kernel.org>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [RFC PATCH 4/6] PM / Runtime: Introduce flag can_power_off
Date: Sat, 18 Feb 2012 20:54:49 +0800 [thread overview]
Message-ID: <CAC=cRTOCpH8haMGDEDDG8k0k2DpaVM7DoU5AayrcscR1rZKXgQ@mail.gmail.com> (raw)
In-Reply-To: <201202180054.49284.rjw@sisk.pl>
On Sat, Feb 18, 2012 at 7:54 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Thursday, February 16, 2012, Zhang Rui wrote:
>> On 二, 2012-02-14 at 23:39 +0100, Rafael J. Wysocki wrote:
>> > On Tuesday, February 14, 2012, Zhang Rui wrote:
>> > > On 一, 2012-02-13 at 20:38 +0100, Rafael J. Wysocki wrote:
>> > > > On Monday, February 13, 2012, Alan Stern wrote:
>> > > > > On Mon, 13 Feb 2012, Lin Ming wrote:
[snip]
>> Yeah, I have thought about this for quite a while before, there ARE
>> several ways to do this, but these need a lot of changes in bus code, at
>> least for the buses that support device runtime D3 (off) by ACPI.
>>
>> Lets also take SATA port and ZPODD for example,
>> proposal one,
>> 1) introduce scsi_can_power_off and ata_can_power_off.
>> 2) sr driver set scsi_can_power_off bit and scsi layer is aware of this,
>> thus the scsi host can set this bit as well.
>> 3) in the .runtime_suspend callback of ata port, it knows that its scsi
>> host interface can be powered off, thus it invokes ata_can_power_off to
>> tell the ata layer.
>
> Hmm. I'm not sure why you want to introduce this special "power off"
> condition. In fact, it's nothing special, it only means that the device
> in question shouldn't be accessed by software, which pretty much is equivalent
> to the "suspended" condition (as defined in the runtime PM docs).
I think some reasons to introduce can_poweroff can be:
1) To indicate the implementation of .runtime_suspend/.runtime_resume
is compatible with power off. That is, .runtime_suspend will save all
needed information and .runtime_resume can work on the uninitialized
device.
If this is already the requirement of
.runtime_suspend/.runtime_resume. Then this is not needed. Maybe we
can make that explicitly for these callbacks via some kind of
documentation.
2) To support something like pm-qos. power off device may have more
exit.latency than normal low power state (such as D3Hot). Some device
may disable can_power_off based on that.
3) Whether to go to power off should be determined by leaf device
(such as SATA disk), but that may be done by its parent device (such
as SATA port). It's a way for leaf device to tell its parent device
whether it want to go to power off.
[snip]
Best Regards,
Huang Ying
next prev parent reply other threads:[~2012-02-18 12:54 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 9:11 [RFC] ACPI D3Cold state and SATA ZPODD support Lin Ming
2012-02-13 9:11 ` [RFC PATCH 1/6] ACPI: Introduce ACPI D3_COLD state support Lin Ming
2012-02-13 20:25 ` Rafael J. Wysocki
2012-02-14 7:07 ` Zhang Rui
2012-02-14 22:29 ` Rafael J. Wysocki
2012-02-16 7:08 ` Zhang Rui
2012-02-17 22:23 ` Rafael J. Wysocki
2012-02-20 5:39 ` Zhang Rui
2012-02-13 9:11 ` [RFC PATCH 2/6] ACPI: Reference devices in ACPI Power Resource Lin Ming
2012-02-13 20:48 ` Rafael J. Wysocki
2012-02-14 7:59 ` Zhang Rui
2012-02-14 22:36 ` Rafael J. Wysocki
2012-02-16 7:18 ` Zhang Rui
2012-02-16 15:13 ` Alan Stern
2012-02-17 1:12 ` Lin Ming
2012-02-17 22:37 ` Rafael J. Wysocki
2012-02-17 7:05 ` Zhang, Rui
2012-02-17 15:07 ` Alan Stern
2012-02-21 14:07 ` Lin Ming
2012-02-21 16:06 ` Alan Stern
2012-02-23 13:41 ` Lin Ming
2012-02-23 18:10 ` Alan Stern
2012-02-17 22:34 ` Rafael J. Wysocki
2012-02-20 5:43 ` Zhang Rui
2012-02-13 9:11 ` [RFC PATCH 3/6] ACPI: Runtime resume all devices covered by a power resource Lin Ming
2012-02-13 9:11 ` [RFC PATCH 4/6] PM / Runtime: Introduce flag can_power_off Lin Ming
2012-02-13 15:01 ` Alan Stern
2012-02-13 19:38 ` Rafael J. Wysocki
2012-02-13 20:41 ` Alan Stern
2012-02-13 20:50 ` Rafael J. Wysocki
2012-02-14 7:11 ` Zhang Rui
2012-02-14 22:38 ` Rafael J. Wysocki
2012-02-14 6:17 ` Zhang Rui
2012-02-14 22:39 ` Rafael J. Wysocki
2012-02-16 7:41 ` Zhang Rui
2012-02-17 23:54 ` Rafael J. Wysocki
2012-02-18 12:54 ` huang ying [this message]
2012-02-18 20:35 ` Rafael J. Wysocki
2012-02-20 3:23 ` Zhang Rui
2012-02-20 23:13 ` Rafael J. Wysocki
2012-02-21 1:13 ` Zhang Rui
2012-02-21 21:43 ` Rafael J. Wysocki
2012-02-22 0:57 ` Zhang Rui
2012-02-14 6:07 ` Zhang Rui
2012-02-13 9:11 ` [RFC PATCH 5/6] PCI: Move acpi_dev_run_wake to acpi core Lin Ming
2012-02-13 20:49 ` Rafael J. Wysocki
2012-02-13 9:11 ` [RFC PATCH 6/6] libata: add ZPODD support Lin Ming
2012-02-15 6:06 ` Aaron Lu
2012-02-15 6:46 ` Lin Ming
2012-02-15 7:18 ` Aaron Lu
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='CAC=cRTOCpH8haMGDEDDG8k0k2DpaVM7DoU5AayrcscR1rZKXgQ@mail.gmail.com' \
--to=huang.ying.caritas@gmail.com \
--cc=jgarzik@pobox.com \
--cc=lenb@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=rjw@sisk.pl \
--cc=rui.zhang@intel.com \
--cc=stern@rowland.harvard.edu \
--cc=tj@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).