From: David Brownell <david-b@pacbell.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Linux-pm mailing list <linux-pm@lists.osdl.org>
Subject: Re: [RFC] Disabling Devices
Date: Fri, 13 May 2005 00:30:44 -0700 [thread overview]
Message-ID: <200505130030.44565.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0505111458200.16579-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 4028 bytes --]
On Wednesday 11 May 2005 12:10 pm, Alan Stern wrote:
> On Wed, 11 May 2005, David Brownell wrote:
>
> > On Monday 09 May 2005 11:06 am, Alan Stern wrote:
> > > There's an issue here that needs to be discussed explicitly. How finely
> > > should the kernel allow userspace to control runtime power management?
> > >
> > > ...
> > > (B) Or should the kernel export a relatively small set of power
> > > domains and a small set of primitives for each domain? Like:
> > > suspend, turn off remote wakeup, go to full power, suspend
> > > after N seconds of inactivity?
> > >
> > > ...
> > >
> > > In general (A) most resembles what sysfs does right now. I suspect that
> > > (B) will be a better solution in the end.
> >
> > Yes.
>
> Assuming other people agree, the question becomes: What structures and
> resources does the kernel need in order to implement and export these
> power domains and primitives?
And for what purposes? Different purposes tend to need different answers
for those other questions.
> > > Regarding Dave's comments about hdparm and xset dpms -- what matters most
> > > about these interfaces is not that they are application-specific but that
> > > they are ad-hoc.
> >
> > How does "application-specific" differ from "ad-hoc" though?
> > In practical terms; one is more pejorative than the other, but
> > how exactly does one measure a difference?
>
> "Application-specific" refers to the fact that the interfaces are used (or
> are intended to be used) by only one or two applications; the term has
> nothing to do with kernel code.
Actually it does; "application" is a pretty generic term, and
from the hardware perspective, the "application" often includes
things like OS software (which is different in each product).
It's not just different userspace programs or user interfaces.
So for example PM concepts exported through a driver stack can
be "application specific" ... different subsystems may need to
handle them differently, because of different requirements.
> "Ad-hoc" on the other hand describes the
> way in which the kernel implements the interfaces.
This doesn't enlighten me in terms of objective measures.
Different applications imply different implementations,
and often different interfaces. X11 is a network
protocol, so 'xset dpms' uses network messages. But IDE
isn't, so "hdparm" uses IDE messages.
> > For example, the kernel doesn't know about X11 protocol at all,
> > or those particular IDE protocol requests. And most folk would
> > probably say that it shouldn't need to ...
>
> Isn't it true that with IDE drives, you tell the drive how long to wait
> before doing an idle spindown? So the kernel doesn't have to worry about
> keeping track of when the timeout expires; the firmware takes care of it.
> If the kernel _did_ need to keep track of the timeout then it _would_
> need to understand the IDE protocol for spinning down a disk.
That's my point. The application in this case is "everything
accessing the IDE drive" and it involves both kernel components
(block driver) and userspace ones ("hdparm"). The IDE disk sure
can't tell the difference in where a request came from!
It's a good point that the firmware itself is another software
component. In this case it's one with a standardized interface
to setting that spindown timer: IDE messages, no driver model.
> > For new things, or things being generalized into kernel support,
> > I've no fundamental issue with using sysfs. But for things that
> > are widely deployed today, I don't see much point in changing
> > interfaces.
>
> There's no need to change the existing interfaces. But we could add new
> interfaces so that all devices can be controlled in a uniform way, in
> addition to the application-specific ways they are controlled now.
There are lots of things we could do, yes. Whether we should, or not,
is a question worth answering. What's the benefit of a "more uniform"
way to do things? Is there some problem being solved?
- Dave
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-05-13 7:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.0505091124370.5325-100000@iolanthe.rowland.org>
2005-05-09 16:51 ` [RFC] Disabling Devices David Brownell
2005-05-09 18:06 ` Alan Stern
2005-05-11 14:04 ` David Brownell
2005-05-11 19:10 ` Alan Stern
2005-05-13 7:30 ` David Brownell [this message]
2005-05-13 15:40 ` Alan Stern
2005-05-09 2:15 Adam Belay
2005-05-09 10:46 ` Pavel Machek
2005-05-09 14:26 ` Alan Stern
2005-05-09 15:04 ` Adam Belay
2005-05-11 8:39 ` Pavel Machek
2005-05-09 16:57 ` 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=200505130030.44565.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-pm@lists.osdl.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox