mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: david@lang.hm
Cc: LKML <linux-kernel@vger.kernel.org>,
	linux-pm <linux-pm@lists.linux-foundation.org>
Subject: Re: Power Management framework proposal
Date: Sun, 22 Jul 2007 15:27:20 -0700	[thread overview]
Message-ID: <1185143240.2714.24.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0707221130380.6350@asgard.lang.hm>

On Sun, 2007-07-22 at 11:56 -0700, david@lang.hm wrote:
> >
> > I have a concern with this approach though. It seems to assume that
> > there is one global thing somewhere that sets the system state; in my
> > experience that is the wrong approach; in fact there is a very definite
> > evidence that there are many decisions on power that are to be made
> > local at a high frequency. An example of this is the processor speed;
> > the ondemand governer does exactly this for the cpus that can switch
> > speeds fast; it's just impossible to beat such a local, fast decision
> > with anything on a global scale.
> 
> the intent was not to have one global call that sets the mode on all 
> devices, but rather have one call for each device/subsystem, just the same 
> call in each case.
> 
> there's also nothing that says that there can only be one thing setting 
> the mode (although that does mean a fourth call 'report_current_mode()' or 
> similar is needed). and if you choose to have two pieces of software 
> managing the same device things could get 'interesting'.
> 
> as for the speed that such decisions need to be made.
> 
> this API is not saying anything about the speed of the decisions.
> it's also not saying anything about if the decision makeing is being done 
> by kernelspace or userspace. it's just providing a common way for whatever 
> software is doing the decision makeing to find out it's options and set 
> the modes.


but it makes for a layer between the device and the setting of the
modes..  which sort of would defeat the option of having things truely
local.

Settings don't mean much in general (in specific cases, maybe), it's the
requirements that matter. The *intent* matters. Linus forced this into
cpufreq way back, and while I and perhaps others thought he was just
being silly, 6 years later it turns out he was absolutely right.

Maybe something else
A power policy management framework doesn't need a unified framework (I
know this for a fact, I'm hoping to release the code within a few
weeks). A unified interface doesn't even help one single bit: the
semantics of each part is *extremely* different even if you make it look
the same; the sameness is only cosmetic.

The consequences of managing a disk vs managing a cpu vs managing the
LCD brightness via the X server are all very different. The tradeoffs
you need to make are all very different. The things you want to control
are all very different. Trying to force a standard interface makes the
interface for a specific subsystem go away from the *actual* best
interface for that subsystem, for no gain since the thing that manages
the policy needs to have different parts for each *anyway*.



Now I realize that the needs for "hard small embedded" are different
from "PC like", and to be honest, I don't think it's entirely possible
to unify them; I don't think it's even worthwhile to pursue that (look
at where those attempts have gotten us so far)... but I suspect even in
the small embedded space a standard, forced and thus unnatural interface
isn't what is needed.


-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


  reply	other threads:[~2007-07-22 22:29 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22  6:49 david
2007-07-22  7:57 ` [linux-pm] " Igor Stoppa
2007-07-22  8:58   ` david
2007-07-22 12:05     ` Igor Stoppa
2007-07-22 21:21       ` david
2007-07-22 23:09         ` Arjan van de Ven
2007-07-23  2:45           ` david
2007-07-23  3:50             ` Arjan van de Ven
2007-07-23  4:04               ` david
2007-07-23  4:19                 ` Arjan van de Ven
2007-07-23  5:25                   ` david
2007-07-23 14:12                     ` Arjan van de Ven
2007-07-23 18:19                       ` david
2007-07-23  8:56                   ` Ondrej Zajicek
2007-07-23 17:33                     ` david
2007-07-27 12:04                     ` Pavel Machek
2007-07-23 10:48         ` Igor Stoppa
2007-07-23 18:14           ` david
2007-07-24  8:43             ` Jerome Glisse
2007-07-24 14:18               ` Igor Stoppa
2007-07-24 20:13                 ` david
2007-07-24 20:06               ` david
2007-07-24 23:14                 ` Jerome Glisse
2007-07-25  0:40                   ` david
2007-07-25 12:49                     ` Jerome Glisse
2007-07-29 21:56                       ` david
2007-07-22 17:26 ` Arjan van de Ven
2007-07-22 18:56   ` david
2007-07-22 22:27     ` Arjan van de Ven [this message]
2007-07-23  3:51       ` david
2007-07-23  4:00         ` Arjan van de Ven
2007-07-23  4:09           ` david
2007-07-27 11:46             ` Pavel Machek
2007-07-29 22:00               ` david
2007-07-30  1:05                 ` Matthew Garrett
2007-07-23 22:23   ` Benjamin Herrenschmidt
2007-07-24 20:14     ` david
2007-07-24 21:38       ` Benjamin Herrenschmidt
2007-07-24 23:02         ` david
2007-07-24 23:47           ` Benjamin Herrenschmidt

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=1185143240.2714.24.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=david@lang.hm \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.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

all inboxes | Powered by JetHome®