mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pering, Trevor" <trevor.pering@intel.com>
To: "'Alan Cox'" <alan@lxorguk.ukuu.org.uk>,
	Linus Torvalds <torvalds@transmeta.com>
Cc: Dominik Brodowski <devel@brodo.de>,
	cpufreq@www.linux.org.uk, linux-kernel@vger.kernel.org
Subject: RE: [PATCH][2.5.32] CPU frequency and voltage scaling (0/4)
Date: Thu, 29 Aug 2002 08:07:51 -0700	[thread overview]
Message-ID: <C81D8E612E5DD6119653009027AE9D3EE091D0@FMSMSX36> (raw)

And now comes the problem with the policy approach -- what to include in the
policy... event-HZ? Temperature? Mem Bus Freq? The list is endless. But,
here's my thoughts on the matter (not sure this adds anything new, but it
helps clarify it for me, at least). 

Taking the graphics card analogy... Graphics subsystems have evolved over
many years. Initial implementations were just direct-access-framebuffers,
and in fact, were initially often indirect-access frame-buffers (e.g., the
Apple II didn't even have a linear memory map for the character display,
IIRC). Over time, individual companies would develop optimized hardware and
write libraries for it, and then eventually abstractions like OpenGL or
DirectX appeared -- *after* people knew what was useful and what was not. 

In a "well-formed" world, we could probably start off with a very basic
interface, which is what cpufreq has tried to do, and then build policy on
top of that. However, we are already effectively building on top of
abstraction, so things are a little more complicated -- as Linus points out,
just specifying the exact frequency makes no sense anymore.

If you want to continue the graphics analogy, then we're in the position of
trying to write a driver that both handles bitmapped displays as well as
vector plotters. Just allowing direct bitmap access makes *no* sense in this
situation because they are meaningless for a vector plotter, which always
draws lines.

So, if you need to support two sets of graphics drivers, one that provides
draw_point(x,y), and one that provides draw_line(x1,y1,x2,y2) -- what do you
do? I would say you provide draw_line(x1,y1,x2,y2), and which can be reduced
to draw_point(x,y), if necessary. 

So, cpufreq is trying to just support set_freq(x), while some processors
_require_ a call in the form of bound_freq(x1,x2). Exact same situation.

Given that, there are still a couple of open questions:

1) About the policy field -- I think this should be as simple as possible...
because the use is either going to be simple, or way to complex to
effectively capture. So, the enumerated policy is probably best. Start
simple, then add other things if absolutely necessary.

2) To use MHz or something else? The problem is that the number here is
virtually meaningless. It does not translate from machine to machine,
processor to processor, or application to application. So, if you have to
pick a meaningless metric, what do you use? I would actually argue for % of
full capacity instead of MHz, but it doesn't really matter in the end.

3) Thermal overloading -- this, I believe, is a separate issue from the
cpufreq setting for things. I would leave this out of the equation, and let
the lower-level components handle this. I.e., think of "cpufreq" as a
suggestion, and if the suggestion would break something, then it is ignored.
If you really wanted, you could have a policy that is something like
"IgnoreThermal" -- but I think that would be silly.

4) The whole "one number describes processor behavior" is also somewhat
silly -- there is the core frequency, memory bus frequency, internal bus
frequency, etc... multipliers, dividers, PLLs -- everywhere!  Still not sure
what to do about this, at the moment -- but, I think this might be a
convenient use for the policy field. I.e., in "Performance" state it does
one thing (fasted mem bus freq available), in "Conservation" state it does
another (slowest available). But... (see point #1)... should this be a
separate field or not?  Start simple, then build on later, if necessary.

Another way of looking at this is to break the calls up into component
parts:
freq_set_minmax(x,y)
freq_set_exact(x)  (same as freq_set_minmax(x,x))
freq_set_policy(p)
(but then there are synchronization issues...)
freq_synchronize()
etc...

	Trevor


-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
Sent: Thursday, August 29, 2002 3:54 AM
To: Linus Torvalds
Cc: Dominik Brodowski; cpufreq@www.linux.org.uk;
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][2.5.32] CPU frequency and voltage scaling (0/4)


>  { min-Hz, max-Hz, policy }
> 

For a few of the processors "event-hz" or similar would be nice. The
Geode supports hardware assisted bursting to full processor speed when
doing SMM, I/O and IRQ handling.


_______________________________________________
Cpufreq mailing list
Cpufreq@www.linux.org.uk
http://www.linux.org.uk/mailman/listinfo/cpufreq

             reply	other threads:[~2002-08-29 15:04 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29 15:07 Pering, Trevor [this message]
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
  -- 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-28 11:46 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
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

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=C81D8E612E5DD6119653009027AE9D3EE091D0@FMSMSX36 \
    --to=trevor.pering@intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cpufreq@www.linux.org.uk \
    --cc=devel@brodo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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®