From: Todd Poynor <tpoynor@mvista.com>
To: Adam Belay <ambx1@neo.rr.com>
Cc: linux-pm@lists.osdl.org
Subject: Re: [RFC] A New Power Management API
Date: Fri, 15 Apr 2005 19:53:40 -0700 [thread overview]
Message-ID: <42607E34.7060909@mvista.com> (raw)
In-Reply-To: <1113591290.3451.79.camel@localhost.localdomain>
Adam Belay wrote:
> On Fri, 2005-04-15 at 09:50 -0600, Jordan Crouse wrote:
...
>>This is where I see the policy managers taking a greater role. In
>>addition to the hard coded states (the first five you defined sound fine
>>to me), the user would define a number of pseudo system states as well
>>as define the translation tables for device states under those pseudo
>>states. Each pseudo state would be registered with the PM core and
>>assigned a unique identifier.
>
>
> That's an interesting idea. How would the sysfs interface work? In
> general, it's challenging to allow the user to define policy
> configuration settings on a per-system-state basis.
>
>
>>We would then define a system state flag, say
>>PM_SYSTEM_STATE_PSEUDO, which would prompt a driver to query its policy
>>manager to get the translation for the right device state. Those
>>devices that don't understand or care about user defined power
>>states would simply ignore the flag.
>
>
> I think the policy manager would directly request for a change of the
> state. Then the driver would handle *suspend. Although the policy
> manger is code included with the driver, I'd like it to handle any
> decisions. So it would be the policy manager's job to notice something
> like PM_SYSTEM_STATE_PSEUDO.
As a real-life embedded systems example, I have periodic conversations
with some folks who design Linux-based mobile phones, and they have
recently asked for the addition of features that I figure can be
addressed by approximately just this.
On the other hand, I've been trying to push them toward a simpler-kernel
model in which all the product-specific logic for placing various
devices in designated power states occurs in a userspace power policy
manager, and: (a) most drivers take no additional action at system
suspend, leaving the policy-manager-set power state in place, with some
exceptions for drivers necessary to run the system right up until sleep
time; (b) most drivers do nothing at system resume other than those
needed to get the system up and running (for a mobile phone, say, at
least mtd subsystem and flash chip driver) and then let userspace policy
manager decide what power state to place all the devices in. Their
products tend to do highly customized things like power back up a small
subset of devices that were on prior to the sleep, or briefly power up
previously-off devices to check to see if any important changes in the
environent occurred during the sleep, etc.
I think either way will work fine for what they're trying to do, am open
to discuss the merits of either approach. If anyone has any comments on
the simplistic kernel method it's appreciated. Thanks,
--
Todd
next prev parent reply other threads:[~2005-04-16 2:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-15 2:46 [RFC] A New Power Management API Adam Belay
2005-04-15 8:21 ` Benjamin Herrenschmidt
2005-04-15 13:16 ` Daniel Petrini
2005-04-15 18:20 ` Adam Belay
2005-04-16 17:13 ` David Brownell
2005-04-17 20:26 ` Adam Belay
2005-04-15 15:50 ` Jordan Crouse
2005-04-15 18:54 ` Adam Belay
2005-04-16 2:53 ` Todd Poynor [this message]
2005-04-16 19:26 ` David Brownell
2005-04-19 3:09 ` Todd Poynor
2005-05-08 19:05 ` David Brownell
2005-04-16 18:24 ` David Brownell
2005-04-17 20:48 ` Adam Belay
2005-04-17 22:29 ` David Brownell
2005-04-17 23:01 ` Adam Belay
2005-04-16 17:27 ` David Brownell
2005-04-17 20:25 ` Adam Belay
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=42607E34.7060909@mvista.com \
--to=tpoynor@mvista.com \
--cc=ambx1@neo.rr.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