public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: "Eugeny S. Mints" <eugeny.mints@gmail.com>
Cc: pm list <linux-pm@lists.osdl.org>
Subject: Re: Alternative Concept [Was: Re: [RFC] CPUFreq PowerOP integration, Intro 0/3]
Date: Wed, 25 Oct 2006 23:05:05 -0400	[thread overview]
Message-ID: <20061026030505.GA18549@dominikbrodowski.de> (raw)
In-Reply-To: <452EC524.5000608@gmail.com>

Hi,

On Fri, Oct 13, 2006 at 02:43:48AM +0400, Eugeny S. Mints wrote:
> >A) The lowest level: lots of knobs.
> >
> >Somewhere in a "computer system"[2] there are very many "knobs" which may
> >be turned to influence various voltages, clock levels, or operating modes
> >("turbo", "performance" or "powersave", for example).
> >
> >Also, there might be many dependencies on how these "knobs" may be
> >changed.
> >
> >Let's assume the system is in a well-defined, working state right now.
> In terms which we use to describe PowerOP a "kbob" is "power parameter"
> and "operating point" is an entity which corresponds to "well-defined, 
> _working_ [system power] state".
> 
> So, what PowerOP Core does: it just maintains a collection of operating 
> point,
> i.e. collection of known-to-be-working system power states. On many 
> platforms
> (especially embedded) not all combinations of power parameters are valid.  
> Some
> [invalid] combinations of the power parameters may crash or damage the 
> system.

Exactly. And that is what I suggest you may want to do in the level _above_
the knobs. Not all platform need or even want this limitations; some require
it. So let's not force it upon everyone, but let's just use it where it
makes sense?


<operating points table library>
              |
	<knob layer>

> 1) you have a table which tells you that there are some  combinations of 
> power
> parameter values which are
> a) _known-to-be-working_
> and
> b) contains SOME_PLATFORM_POWER_PARAMETER=value1.
> Then you chose one of these operating points and switch to it.
> 
> The table creation is simply registration of operating points with POwerOP 
> Core.

Sort of.

> Now selection and switch. Obviously the functionality of selection between
> operating points based on some algo (which btw varies even not across 
> platforms
> but even across different profiles of the same platform) has nothing to do 
> with
> the code which actually switches operating points. So having such
> functionalities coupled within the ->set() method is just invalid design - 
> they
> have to be separated. That's exactly what PowerOP approach does:

Looking at the code, not really -- there my approach was able to use the
same "separation", or "coupling", which PowerOP uses.


> an upper 
> layer
> can implement selection logic leveraging PowerOP Core interface and then 
> request
> POwerOP Core to switch system to the selected operating point.

That's also possible using my approach.

> 2) table does not exist. There are two options here:
> 
> Either,
> a)an entity which calls ->set() for a particular power parameter IS
> RESPONSIBLE for that resulting combination of power parameter values (once 
> the
> set has been executed) IS valid one
> 
> OR
> b) the system executes complex logic you described under D) 1) (in fact,
> cpufreq policy notifiers) to get a valid combination of power parameter 
> values
> with a predefined value of a certain power parameter.
> 
> Let me illustrate why 2)a) is just particular case in contrast to POwerOP 
> which
> is general case in this situation.
> 
> i) PowerOP Core provides interface to get/set value of a particular power 
> parameter
> 
> ii)  Let's assume we limit the set of operating points for a platform to 
> one point.  This one operating point is always the current operating point. 
> All operations occur on the the current operating point.
> 
> iii)in the assumptions above your  ->set() is nothing else than:
> set(param, value)
> {
>  struct powerop_pwr_param p;
> 
>  p.attr = param;
>  p.value = value;
>  powerop_set_pwr_params(CURRENT_POINT, &p, 1);
>  powerop_set_point(CURRENT_POINT);
> }

Here you turn PowerOP on its head -- you modify one Operating Point runtime?
Isn't that two Operating Points? That sounds strange. Also, it again looks
at it from a top->bottom view, which I dislike...

> That's it. Bottom line is: what you are talking about is NOT an Alternative
> Concept but a particular case instead. While PowerOP design is generic case.

As I said -- the differences might be subtle. But they're important. And I
don't care how anything is called -- I care that both the concept and the
code is good.

Thanks,
	Dominik

  parent reply	other threads:[~2006-10-26  3:05 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-24  1:23 [RFC] CPUFreq PowerOP integration, Intro 0/3 Eugeny S. Mints
2006-10-07  2:36 ` Alternative Concept [Was: Re: [RFC] CPUFreq PowerOP integration, Intro 0/3] Dominik Brodowski
2006-10-07  3:15   ` Dominik Brodowski
2006-10-08  7:16   ` Pavel Machek
2006-10-12 15:38     ` Mark Gross
2006-10-12 16:02       ` Dominik Brodowski
2006-10-16 21:56         ` Mark Gross
2006-10-17 21:40           ` Matthew Locke
2006-10-12 16:48       ` Pavel Machek
2006-10-12 17:12         ` Vitaly Wool
2006-10-12 17:23           ` Pavel Machek
2006-10-09 18:21   ` Mark Gross
2006-10-26  3:06     ` Dominik Brodowski
2006-10-12 22:43   ` Eugeny S. Mints
2006-10-13 10:55     ` Pavel Machek
2006-10-16 21:44       ` Mark Gross
2006-10-17  8:26         ` Pavel Machek
2006-10-26  3:05     ` Dominik Brodowski [this message]
2007-03-13  0:57   ` Alternative Concept Matthew Locke
2007-03-13 11:08     ` Pavel Machek
2007-03-13 20:34       ` Mark Gross
2007-03-14  2:30         ` Ikhwan Lee
2007-03-14 10:43           ` Eugeny S. Mints
2007-03-14 17:19             ` David Brownell
2007-03-14 18:12               ` Igor Stoppa
2007-03-14 18:45                 ` David Brownell
2007-03-15  9:53               ` Eugeny S. Mints
2007-03-15 13:04                 ` Igor Stoppa
2007-03-16  2:21                   ` David Brownell
2007-03-16  3:56                     ` Ikhwan Lee
2007-03-16  6:17                       ` David Brownell
2007-03-19  2:27                         ` Ikhwan Lee
2007-03-19  6:07                           ` David Brownell
2007-03-16 13:06                     ` Dmitry Krivoschekov
2007-03-16 18:03                       ` David Brownell
2007-03-18 20:25                         ` Dmitry Krivoschekov
2007-03-19  4:04                           ` David Brownell
2007-03-20  0:03                             ` Dmitry Krivoschekov
2007-03-20  8:07                               ` David Brownell
2007-03-20  9:45                                 ` Dmitry Krivoschekov
2007-03-20 10:30                                   ` Igor Stoppa
2007-03-20 12:13                                     ` Eugeny S. Mints
2007-03-20 12:39                                       ` Igor Stoppa
2007-03-20 13:44                                         ` Dmitry Krivoschekov
2007-03-20 21:03                                         ` David Brownell
2007-03-20 13:07                                     ` Dmitry Krivoschekov
2007-03-20 13:52                                       ` Igor Stoppa
2007-03-20 14:58                                         ` Dmitry Krivoschekov
2007-03-20 15:36                                           ` Pavel Machek
2007-03-20 19:16                                             ` Dmitry Krivoschekov
2007-03-20 20:45                                               ` Pavel Machek
2007-03-20 22:04                                                 ` David Brownell
2007-03-20 22:06                                                   ` Pavel Machek
2007-03-20 23:29                                                     ` David Brownell
2007-03-20 15:36                                           ` Igor Stoppa
2007-03-20 19:17                                             ` Dmitry Krivoschekov
2007-03-20 20:17                                             ` David Brownell
2007-03-20 20:21                                       ` David Brownell
2007-03-20 19:58                                   ` David Brownell
2007-03-24  0:47                                     ` charging batteries from USB [was: Re: Alternative Concept] Dmitry Krivoschekov
2007-03-24  1:17                                       ` David Brownell
2007-03-24  1:48                                         ` Dmitry Krivoschekov
2007-03-24  2:35                                           ` David Brownell
2007-03-24 10:20                                             ` Oliver Neukum
2007-03-24  8:36                                       ` Oliver Neukum
2007-03-14  3:19       ` Alternative Concept Dominik Brodowski

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=20061026030505.GA18549@dominikbrodowski.de \
    --to=linux@dominikbrodowski.net \
    --cc=eugeny.mints@gmail.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