All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	pm list <linux-pm@lists.linux-foundation.org>,
	Pavel Machek <pavel@ucw.cz>,
	linux acpi <linux-acpi@vger.kernel.org>,
	Len Brown <len.brown@intel.com>,
	Shaohua Li <shaohua.li@intel.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Igor Stoppa <igor.stoppa@nokia.com>
Subject: Re: [RFC][PATCH -mm] PM: Introduce set_target method in pm_ops
Date: Sun, 24 Jun 2007 17:01:52 -0700	[thread overview]
Message-ID: <200706241701.53971.david-b@pacbell.net> (raw)
In-Reply-To: <200706241457.21237.rjw@sisk.pl>

On Sunday 24 June 2007, Rafael J. Wysocki wrote:
> On Sunday, 24 June 2007 02:28, Alan Stern wrote:
> > On Sun, 24 Jun 2007, Rafael J. Wysocki wrote:
> > 
> > > > Right now the states we have are On, Standby, and Suspend, and the CPU
> > > > runs only in the On state.  But on some platforms there could be
> > > > multiple states in which the CPU is able to run, albeit with degraded 
> > > > performance.

That starts to get into those cpufreq/"operating point" discussions".


> > > I wouldn't call those system sleep states.  For example, ACPI defines system
> > > sleep states as the states in which no instructions are executed by any CPUs
> > > and I think that's reasonable.

Its Embedded Controller surely executes instructions!


> > > Moreover, the ACPI spec insists that transitions between different sleep
> > > states should be made through the On state.

Not that the world should feel compelled to restrict itself to what
ACPI envisions of course...


> > Okay.  But on non-ACPI systems, do we want to restrict the 
> > /sys/power/state interface to sleep states?  How then should the user 
> > tell the system to go to a low-performance run state?  Or should that 
> > be handled automatically within the kernel?
> 
> I think that the /sys/power/state interface should be restricted to system
> sleep states only and we should introduce another one for handling non-sleep
> low-power states.

Then /sys/power/state would more accurately be named something
like /sys/power/sleep_state, right?

The core reason it would make sense to have such a bifurcation is
IMO that those lower power operating states mostly shouldn't involve
walking the device tree and suspending everything.  They involve some
set of hardware (possibly including CPUs) entering low power states.
But not *every* bit of hardware.

Another aspect here is what idle state is used.  Sometimes that
can be all but indistinguishable from a "sleep" state.


> IMHO, the kernel can automatically transition to non-sleep low-power states,
> but the users should be able to define the conditions for that.  Also, the user
> should be able to force the transition if necessary/desired.

There are several ways those lowpower run states can be entered.
But I'm not keen on userspace being able to "force" transitions
like that.

IMO it's strongly preferable if the platform code -- perhaps its
custom idle loop -- inventories the system regularly to see if
it's eligible to enter one of the states.

As a rule, if certain resources are in use that means related
power states can't be entered.  If they're in use, then userspace
trying to force a transition means breaking something -- else
those resources would stay used!

The similarity with cpufreq is obvious:  cpufreq inventories the
CPU usage regularly to see if the CPU should be revved up or down.

Now, inputs to that inventory can come from userspace ... there's
information about upcoming usage that the kernel could otherwise
only guess at.  User exiting the video playback app, vs just pausing
it, might suggest more aggressive savings are appropriate; etc.
Userspace can also provide tuning parameters.  I have no problems
with that model.

- Dave






  reply	other threads:[~2007-06-25  0:35 UTC|newest]

Thread overview: 111+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19  2:33 [PATCH 1/2] acpi choose sleep state help Shaohua Li
2007-06-19 11:52 ` Rafael J. Wysocki
2007-06-19 22:00   ` Rafael J. Wysocki
2007-06-20  6:18   ` Shaohua Li
2007-06-20 11:32     ` [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) Rafael J. Wysocki
2007-06-20 11:32     ` Rafael J. Wysocki
2007-06-20 14:08       ` Alan Stern
2007-06-20 14:08       ` [linux-pm] " Alan Stern
2007-06-20 14:36         ` Rafael J. Wysocki
2007-06-20 14:36         ` [linux-pm] " Rafael J. Wysocki
2007-06-21  6:57         ` David Brownell
2007-06-21  1:51       ` Len Brown
2007-06-21  7:10         ` David Brownell
2007-06-21  1:51       ` Len Brown
2007-06-21  7:04       ` David Brownell
2007-06-21 12:42         ` Rafael J. Wysocki
2007-06-21 13:03           ` Pavel Machek
2007-06-21 13:03           ` Pavel Machek
2007-06-21 14:46             ` Rafael J. Wysocki
2007-06-21 15:23               ` [linux-pm] " Alan Stern
2007-06-21 19:41                 ` Rafael J. Wysocki
2007-06-21 19:41                 ` Rafael J. Wysocki
2007-06-21 15:23               ` Alan Stern
2007-06-21 16:35               ` David Brownell
2007-06-21 19:42                 ` Rafael J. Wysocki
2007-06-21 19:42                 ` Rafael J. Wysocki
2007-06-21 16:35               ` David Brownell
2007-06-21 14:46             ` Rafael J. Wysocki
2007-06-21 15:37             ` David Brownell
2007-06-21 15:37             ` David Brownell
2007-06-21 18:59               ` [linux-pm] " Pavel Machek
2007-06-21 20:03                 ` David Brownell
2007-06-21 20:37                   ` Rafael J. Wysocki
2007-06-21 20:37                   ` [linux-pm] " Rafael J. Wysocki
2007-06-21 20:03                 ` David Brownell
2007-06-21 18:59               ` Pavel Machek
2007-06-21 19:52               ` Rafael J. Wysocki
2007-06-21 19:52               ` Rafael J. Wysocki
2007-06-21 14:48           ` David Brownell
2007-06-21 20:04             ` Rafael J. Wysocki
2007-06-21 20:04             ` Rafael J. Wysocki
2007-06-21 20:22               ` David Brownell
2007-06-21 20:22               ` David Brownell
2007-06-21 20:41                 ` Rafael J. Wysocki
2007-06-21 20:41                 ` Rafael J. Wysocki
2007-06-21 14:48           ` David Brownell
2007-06-21 12:42         ` Rafael J. Wysocki
2007-06-21 15:56         ` Alan Stern
2007-06-21 16:35           ` David Brownell
2007-06-21 16:35           ` [linux-pm] " David Brownell
2007-06-21 17:11             ` Alan Stern
2007-06-21 17:11             ` [linux-pm] " Alan Stern
2007-06-21 18:02               ` David Brownell
2007-06-21 18:02               ` [linux-pm] " David Brownell
2007-06-21 18:51                 ` Alan Stern
2007-06-21 18:51                 ` [linux-pm] " Alan Stern
2007-06-21 19:51                   ` David Brownell
2007-06-21 19:51                   ` [linux-pm] " David Brownell
2007-06-21 20:35                     ` Rafael J. Wysocki
2007-06-21 20:46                       ` David Brownell
2007-06-21 20:46                       ` [linux-pm] " David Brownell
2007-06-21 21:02                         ` Rafael J. Wysocki
2007-06-21 21:04                           ` Alan Stern
2007-06-21 21:04                           ` [linux-pm] " Alan Stern
2007-06-23 22:00                             ` [RFC][PATCH -mm] PM: Introduce set_target method in pm_ops Rafael J. Wysocki
2007-06-23 23:46                               ` Alan Stern
2007-06-23 23:46                               ` Alan Stern
2007-06-24  0:03                                 ` Rafael J. Wysocki
2007-06-24  0:03                                 ` Rafael J. Wysocki
2007-06-24  0:28                                   ` Alan Stern
2007-06-24  0:28                                   ` Alan Stern
2007-06-24  9:52                                     ` Johannes Berg
2007-06-24  9:52                                     ` [linux-pm] " Johannes Berg
2007-06-24 11:49                                     ` Igor Stoppa
2007-06-24 11:49                                     ` [linux-pm] " Igor Stoppa
2007-06-24 13:04                                       ` Rafael J. Wysocki
2007-06-24 13:04                                       ` Rafael J. Wysocki
2007-06-24 12:57                                     ` Rafael J. Wysocki
2007-06-24 12:57                                     ` Rafael J. Wysocki
2007-06-25  0:01                                       ` David Brownell [this message]
2007-06-25 22:14                                         ` Rafael J. Wysocki
2007-06-25 22:14                                         ` Rafael J. Wysocki
2007-06-25  0:01                                       ` David Brownell
2007-06-25 13:04                                   ` Pavel Machek
2007-06-25 13:04                                   ` Pavel Machek
2007-06-25 13:57                                     ` Dmitry Krivoschekov
2007-06-25 13:57                                     ` [linux-pm] " Dmitry Krivoschekov
2007-06-25 19:28                                       ` Pavel Machek
2007-06-25 22:16                                         ` Rafael J. Wysocki
2007-06-25 22:16                                         ` [linux-pm] " Rafael J. Wysocki
2007-06-25 19:28                                       ` Pavel Machek
2007-06-23 22:00                             ` Rafael J. Wysocki
2007-06-21 21:02                         ` Re: [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) Rafael J. Wysocki
2007-06-21 20:35                     ` Rafael J. Wysocki
2007-06-21 21:00                     ` Platform-specific system power states Alan Stern
2007-06-22 19:49                       ` David Brownell
2007-06-22 21:30                         ` Rafael J. Wysocki
2007-06-23  1:32                           ` Alan Stern
2007-06-23 20:20                             ` Rafael J. Wysocki
2007-06-25  0:10                               ` David Brownell
2007-06-25 22:59                                 ` Rafael J. Wysocki
2007-06-25  0:26                           ` David Brownell
2007-06-25 23:04                             ` Rafael J. Wysocki
2007-06-21 20:19                   ` Re: [RFD] How to tell ACPI drivers what the target sleep state is (was: Re: [PATCH 1/2] acpi choose sleep state help) Rafael J. Wysocki
2007-06-21 20:19                   ` [linux-pm] " Rafael J. Wysocki
2007-06-21 20:32                     ` David Brownell
2007-06-21 20:50                       ` Rafael J. Wysocki
2007-06-21 20:50                       ` Rafael J. Wysocki
2007-06-21 20:32                     ` David Brownell
2007-06-20 11:32     ` Rafael J. Wysocki
2007-06-21  7:14     ` [PATCH 1/2] acpi choose sleep state help David Brownell

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=200706241701.53971.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=igor.stoppa@nokia.com \
    --cc=johannes@sipsolutions.net \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    --cc=shaohua.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.