public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jw schultz <jw@pegasys.ws>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.5.32] CPU frequency and voltage scaling (0/4)
Date: Thu, 29 Aug 2002 17:39:13 -0700	[thread overview]
Message-ID: <20020830003913.GC24307@pegasys.ws> (raw)
In-Reply-To: <Pine.LNX.4.44.0208281633410.27728-100000@home.transmeta.com>

On Wed, Aug 28, 2002 at 04:49:45PM -0700, Linus Torvalds wrote:
> 
> On 29 Aug 2002, Alan Cox wrote:
> > 
> > One of the policies I need from the kernel is "run at the frequency I
> > told you to run". Its a policy, its not the general case policy. The
> > /proc file is that policy.
> 
> That's ok, but the current code DOES NOT DO THAT.
> 
> The current code has no support at all for the notion of policies, and 
> gives absolutely _zero_ support for it. It blindly assumes that the CPU 
> can (and should) run at one frequency, and as long as it does that, I 
> don't want it in the kernel.
> 
> > cpufreq is cpu speed control not power management policy. I agree
> > entirely that most people should not be using echo "500" >/proc/... as a
> > power management policy. 
> > 
> > Likewise /dev/hda is not a file system and peopel should not be using dd
> > to store there files.
> 
> You've had that argument before, and it was bogus then - and it is bogus 
> now.
> 
> Exactly because some chips _need_ to have the policy passed down, the 
> lowest levels need to be able to pass it down.
> 
> It is _then_ ok to say that "if you do a 'echo 500 > /proc/cpu/freq', that
> will also imply a policy of a fixed frequency". But if the frequency
> setting code does not allow for any policy interface AT ALL, then it is
> fundamentally broken.
> 
> That's my beef with it. We should not have "generic" interfaces that are
> known to be fundamentally broken. As it is, the code - as designed - is
> useless for a growing class of devices.
> 
> Think of it as a layering issue:
>  - user level policy
>  - kernel interface (possibly many - for different policies)
>  - low-level driver
> 
> Ok?
> 
> Now, what the current patches do is (a) one kernel interface (the 
> fixed-frequency one) and (b) low-level drivers.
> 
> The kernel interface is fine - it doesn't do what I think many people 
> might want to do, but it's simple and I agree that other policies can be 
> implemented with other interfaces. Fine. 
> 
> But the fact that low-level drivers don't even support the notion of a 
> policy means that they are useless for any other interface. And I'm saying 
> that it's a clear design bug, and for no good reason. 

As a user (for the sake of argument) i don't want to see an
uneccesary proliferation of interfaces.  There is no reason
why the interface cannot be made policy aware from the
beginning even if it starts out only supporting the one
policy of fixed.

Something like 'echo "fixed 500M" >/proc/cpu/freak'
would allow the addition of new policies without having to
add new interfaces.  Notice that i give the policy as the
first parameter.  Each policy should register itself with
its callbacks (read, write, ?).

Probably should have a something like /proc/filesystems
that reports supported policies since supportable
policies would vary according to hardware + emulation.


-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw@pegasys.ws

		Remember Cernan and Schmitt

  reply	other threads:[~2002-08-30  0:35 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-28 11:46 [PATCH][2.5.32] CPU frequency and voltage scaling (0/4) Dominik Brodowski
2002-08-28 18:47 ` Linus Torvalds
2002-08-28 18:48   ` Cort Dougan
2002-08-28 19:25     ` Alan Cox
2002-08-28 19:32       ` Cort Dougan
2002-08-29 10:26         ` Zwane Mwaikambo
2002-08-28 19:41       ` Peter Riocreux
2002-08-28 19:58       ` Linus Torvalds
2002-08-29  9:51         ` Padraig Brady
2002-08-29 10:23     ` Zwane Mwaikambo
2002-08-28 19:21   ` Alan Cox
2002-08-28 19:49     ` Linus Torvalds
2002-08-28 20:25       ` Alan Cox
2002-08-28 20:29         ` Linus Torvalds
2002-08-28 23:26           ` Alan Cox
2002-08-28 23:49             ` Linus Torvalds
2002-08-30  0:39               ` jw schultz [this message]
2002-08-29  7:01             ` Dominik Brodowski
2002-08-28 20:39         ` Dominik Brodowski
2002-08-28 21:05           ` Linus Torvalds
2002-09-06 11:31             ` Pavel Machek
2002-08-28 20:27       ` Dominik Brodowski
2002-08-28 20:19   ` Dominik Brodowski
2002-08-28 20:43     ` Linus Torvalds
2002-08-28 20:53       ` Dominik Brodowski
2002-08-28 21:08         ` Linus Torvalds
2002-08-28 23:00           ` george anzinger
2002-08-28 23:30           ` Alan Cox
2002-08-29  0:08             ` Linus Torvalds
2002-08-29  7:07               ` Dominik Brodowski
2002-08-29 10:02               ` Padraig Brady
2002-08-29 10:53               ` Alan Cox
2002-08-29 13:38                 ` Dave Jones
2002-08-29 18:47                 ` Linus Torvalds
2002-08-29 19:24                   ` Alan Cox
2002-08-29 21:22                   ` george anzinger
2002-08-30  6:46                     ` David Gibson
2002-08-30  7:54                     ` Helge Hafting
2002-08-30  3:21                 ` David Lang
  -- strict thread matches above, loose matches on Subject: below --
2002-08-28 20:25 Grover, Andrew
2002-08-28 20:46 ` Linus Torvalds
2002-08-29 15:07 Pering, Trevor
2002-08-30  8:04 ` Helge Hafting
2002-08-30 11:53   ` Dave Jones
2002-08-30 12:36     ` Helge Hafting
2002-08-30 22:43       ` george anzinger

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=20020830003913.GC24307@pegasys.ws \
    --to=jw@pegasys.ws \
    --cc=linux-kernel@vger.kernel.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