mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carl Thompson <cet@carlthompson.net>
To: dongili@supereva.it
Cc: linux-kernel@vger.kernel.org, cpufreq@www.linux.org.uk
Subject: Re: [PATCH] 3/3 Dynamic cpufreq governor and updates to ACPI P-state driver
Date: Tue, 21 Oct 2003 12:23:18 -0700	[thread overview]
Message-ID: <1066764198.5424d9a4ec004@carlthompson.net> (raw)
In-Reply-To: <20031021105234.GF893@inferi.kami.home>

I know Linus wrote this but...

> ...

> A quote from Peter Anvin:
>
>   "What is worse is that the interface is, in my opinion, fundamentally
>    broken for *ALL* CPUs.  It doesn't present a policy interface to the
>    kernel, instead it presents a frequency-setting interface and expect
>    the policy to be done in userspace.  The kernel is the only part of
> the
>    system which has sufficient information (idle times of all CPUs, for
>    example) to do a decent job managing the CPU frequency efficiently.
>    On Transmeta CPUs this policy should simply be passed down to CMS, of
>    course; on other CPUs the kernel needs to manage it."
>
> In other words: there is no valid way that a _user_ can set the policy
> right now: the user can set the frequency, but since any sane policy
> depends on how busy the CPU is, the user isn't even, the right person to
> _do_ that, since the user doesn't _know_.

But userspace _can_ know the idle statistics for each CPU.  It's easily read
from /proc/stat.

> Also note that policy is not just about how busy the CPU is, but also
> about how _hot_ the CPU is. Again, a user-mode application (that maybe
> polls the situation every minute or so), simply _cannot_ handle this
> situation. You need to have the ability to poll the CPU tens of times a
> second to react to heat events, and clearly user mode cannot do that
> without impacting performance in a big way.

Well, my "cpuspeed" daemon has been doing exactly this without problems for
the better part of a year on many laptops tested by me and others.  Polling
the CPU temperature every second or two seems quite sufficient to head off
any heat related problems (including on problematic systems like the Sony
Vaio FXA series).  It doesn't appear to necessary to poll faster on current
hardware even with severe load spikes.  (Obviously, hardware failures in
the cooling system are another matter but the CPUs internal protection
should handle that.)

My cpuspeed daemon uses a negligable amount of CPU so it doesn't seem like a
terrible solution...

(As mentioned previously, CPUs that change their own speed are a separate
issue.)

Carl Thompson

> ...



  parent reply	other threads:[~2003-10-21 19:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21  2:56 Pallipadi, Venkatesh
2003-10-21  8:38 ` Arjan van de Ven
2003-10-21  9:59   ` Mattia Dongili
2003-10-21 10:17     ` Wichert Akkerman
2003-10-21 10:52       ` Mattia Dongili
2003-10-21 15:36         ` Daniel Thor Kristjansson
2003-10-21 20:32           ` Dominik Brodowski
2003-10-22 15:48             ` Daniel Thor Kristjansson
2003-10-23 14:32             ` Pavel Machek
2003-10-24 18:22               ` Dominik Brodowski
2003-10-21 19:23         ` Carl Thompson [this message]
2003-10-21 20:37           ` Dominik Brodowski
2003-10-23 14:17 ` Pavel Machek
2003-10-23 20:47   ` Moore, Robert
2003-10-23 21:50     ` Nakajima, Jun
2003-10-24 18:38       ` Dominik Brodowski
2003-10-24 11:27     ` Ducrot Bruno
2003-10-24 18:52 Pallipadi, Venkatesh

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=1066764198.5424d9a4ec004@carlthompson.net \
    --to=cet@carlthompson.net \
    --cc=cpufreq@www.linux.org.uk \
    --cc=dongili@supereva.it \
    --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

all inboxes | Powered by JetHome®