public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: linux-pm@lists.osdl.org
Cc: Adam Belay <abelay@novell.com>
Subject: Re: [RFC] Mapping Device Power States
Date: Thu, 7 Apr 2005 15:04:47 -0700	[thread overview]
Message-ID: <200504071504.47531.david-b@pacbell.net> (raw)
In-Reply-To: <1112909150.21887.18.camel@linux.site>

[-- Attachment #1: Type: text/plain, Size: 2837 bytes --]

On Thursday 07 April 2005 2:25 pm, Adam Belay wrote:
> 
> Linux supports a wide variety of hardware, each with different power
> management characteristics and capabilities.  However, power management
> statistics (e.g. calling a power tick for determining an idling) are
> generally gathered at the class device level.  In order for class
> devices to relate bus specific power states to their own state change
> intentions, it may make sense to have a table mapping each bus level
> power state to its corresponding generic Linux power state.

I'm not clear on that "In order for ...".  For one thing, class
devices aren't necessarily relevant.  For another, it presumes
the notion of a "generic" (device) power state.

But I guess my fundamental question is:  why should anything other
than its driver want to know about the device's power state?

System suspend transitions can all be handled by a "make yourself
compatible with this target system state" request.  The details of
how that's done are irrelevant outside the drivers.  Likewise,
runtime/dynamic/whatever power management operations can be done
at any time ... in fact, I'd argue all hardware should stay in
low power modes until it's actually needed, and entering higher
power modes should normally be transparent.  (So that if they
are stupid and stay in high power modes all the time, the only
penalty is wasted power.)


> Another problem with having multiple separate states is that it is very
> difficult to relate the power requirements of child devices when the
> parent has a different set of bus level power states.

That's a partial answer to my question:  sometimes a "container"
needs to coordinate power states of several devices.  OK; they
may have private agreements.  (A "bus" might be a "container",
but not all containers are busses.  Some are bridges, or hubs,
and some are less regular components involving multiple sorts
of control, data, and power connection.)

Of course, the current PM models in Linux don't exactly have such
a "container" model.  We've discussed needing child-to-parent
notificatios at various points, and those would be part of such
a model.


> I would like to explore the possibility of defining a set of generic
> power states, to which each bus level state can be mapped.  It might be
> as follows:
> 
> functional - the device is operational.
> context - the current data/operations passing through the device
> configuration - resources, firmware, settings done in *probe, etc.

The only one of those that seems needed outside of the driver
itself is whether it's "functional".  The rest are private to
the driver or maybe its container.


In short:  why should there be any Linux-wide notion like that?
Wouldn't trying to create one just be the problem of creating a
"Grand Unified Theory of Power Management"?

- Dave

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2005-04-07 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 21:25 [RFC] Mapping Device Power States Adam Belay
2005-04-07 22:04 ` David Brownell [this message]
2005-04-07 23:56   ` Benjamin Herrenschmidt
2005-04-08  0:39     ` David Brownell
2005-04-11  9:50 ` Li Shaohua

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=200504071504.47531.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=abelay@novell.com \
    --cc=linux-pm@lists.osdl.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