From: David Brownell <david-b@pacbell.net>
To: linux-pm@lists.linux-foundation.org
Cc: pavel@ucw.cz
Subject: Re: [RFC] dynamic device power management proposal
Date: Thu, 22 Mar 2007 11:53:51 -0700 [thread overview]
Message-ID: <200703221153.52227.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0703221039001.3605-100000@iolanthe.rowland.org>
On Thursday 22 March 2007 7:45 am, Alan Stern wrote:
> On Thu, 22 Mar 2007, Scott E. Preece wrote:
>
> > I would normally call designs that expect important functions (like
> > power on/power off) to happen as side effects of other operations (like
> > opening and closing files) broken to begin with. It's still a bad idea
> > to hide policy inside the driver.
>
> Even though other people have already answered this, I'd like to add my
> own comments.
>
> Firstly, doing power on/power off as side effects of other operations is
> _not_ a policy choice. It is a design principle:
Yes ... and one that's widely used in other contexts: deallocate
resources when they're not in active use.
> When device D has been idle for more than N ms, it should be
> put in a low-power state (unless such state changes have been
> disabled for D by userspace).
THAT is however something I would call a heuristic. It's a widely
used one -- disk spindown uses one value for N, displays enter their
lowpower states using other values for N, etc -- but it's still not
as definitive as for example "if the device isn't opened, it can't
possibly be in use".
Not that I see a way around having such a heuristic for things like mice,
or anything wrong with that one ... I just want to call a spade a spade
here, and not confuse (a) the design principle, with (b) a heuristic that's
used to implement that principle in certain cases.
> Of course N will vary for different D's, and the exact choice of N _is_
> policy. Thus N should be exposed and configurable by userspace. So
> should the ability to disable the state changes. But the principle
> above isn't a policy, it is part of the design.
>
> Secondly, this principle _requires_ that power on/power off occur as side
> effects of other operations, since those other operations affect whether
> or not the device is idle.
>
> If anybody wants to argue against the principle itself, then go ahead and
> say so. I, for one, don't see anything objectionable about it.
Me either -- for either principle or, in general, that heuristic.
Of course, choosing to apply that heuristic to a given device is
a different kettle of fish. That's why it's got an "off" switch. :)
- Dave
next prev parent reply other threads:[~2007-03-22 18:53 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 13:39 [RFC] dynamic device power management proposal Scott E. Preece
2007-03-22 13:48 ` Oliver Neukum
2007-03-22 14:01 ` Pavel Machek
2007-03-22 14:45 ` Alan Stern
2007-03-22 18:53 ` David Brownell [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-03-22 19:18 Scott E. Preece
2007-03-22 19:05 Scott E. Preece
2007-03-27 12:05 ` Pavel Machek
2007-03-27 12:19 ` Oliver Neukum
2007-03-21 20:19 Scott E. Preece
2007-03-21 21:45 ` Pavel Machek
2007-03-26 13:53 ` Amit Kucheria
2007-03-19 9:08 Shaohua Li
2007-03-19 15:44 ` Alan Stern
2007-03-20 1:06 ` Shaohua Li
2007-03-20 14:58 ` Alan Stern
2007-03-21 1:43 ` Shaohua Li
2007-03-21 14:44 ` Alan Stern
2007-03-22 4:42 ` Len Brown
2007-03-22 11:56 ` Jim Gettys
2007-03-22 19:28 ` David Brownell
2007-03-22 13:20 ` Pavel Machek
2007-03-22 13:44 ` Oliver Neukum
2007-03-22 13:56 ` Pavel Machek
2007-03-22 14:18 ` Oliver Neukum
2007-03-22 14:22 ` Pavel Machek
2007-03-22 14:26 ` Oliver Neukum
2007-03-22 14:35 ` Pavel Machek
2007-03-22 19:41 ` David Brownell
2007-03-22 19:58 ` David Brownell
2007-03-20 18:30 ` Pavel Machek
2007-03-21 1:34 ` Shaohua Li
2007-03-21 15:21 ` Amit Kucheria
2007-03-21 21:49 ` Dmitry Krivoschekov
2007-03-21 22:54 ` Pavel Machek
2007-03-21 21:39 ` Pavel Machek
2007-03-22 3:09 ` Shaohua Li
2007-03-22 13:13 ` Pavel Machek
2007-03-22 19:20 ` David Brownell
2007-03-22 20:32 ` Alan Stern
2007-03-22 20:02 ` David Brownell
2007-03-22 22:10 ` Greg KH
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=200703221153.52227.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
/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