cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Len Brown <lenb@kernel.org>
Cc: Dave Jones <davej@redhat.com>,
	linux-acpi@vger.kernel.org, cpufreq@vger.kernel.org
Subject: Re: [PATCH, RESEND] acpi-cpufreq: remove unreliable optional device.get() code
Date: Sun, 17 Jul 2011 16:59:18 +0200	[thread overview]
Message-ID: <20110717145918.GA32223@comet.dominikbrodowski.net> (raw)
In-Reply-To: <alpine.LFD.2.02.1107161846130.11045@x980>

On Sat, Jul 16, 2011 at 06:49:34PM -0400, Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
> Date: Mon, 6 Jun 2011 01:06:57 -0400
> 
> cpufreq offers the optional driver.get() entry point
> for drivers to export instantaneous frequency in
> /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq.
> 
> 25% of the acpi-cpufreq driver is involved in supporting
> that optional feature, but on modern processors, it
> is not reliable.
> 
> So here we delete this optional feature from acpi-cpufreq.
> /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq
> will go away on acpi-cpufreq systems, but note that
> /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
> will still be presnet to indicate the most recent request.
> 
> (and yes, powertop still works:-)
> 
> The most common reason that driver.get() is not reliable
> is that modern processors autonomously change frequency
> without OS instruction.  This means that reading
> PERF_STATUS is possibly in-accurate as soon as the
> instruction after it is read.
>
> Average frequency over an interval is more useful
> than instantaneous frequency on modern hardware.
> acpi-cpufreq supplies average frequency via
> the the driver->getavg() entry, which is what
> the ondemand governor uses.

Regarding this patch and the philosophy behind it, I uphold my doubts which
I specified last time this issue came up (cf.
http://marc.info/?l=linux-acpi&m=130742534931688&w=2 )

Best,
	Dominik

  reply	other threads:[~2011-07-17 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06  5:47 [PATCH] acpi-cpufreq: remove unreliable get-frequency functions Len Brown
2011-06-06  7:12 ` Dominik Brodowski
2011-06-07  4:07   ` Len Brown
2011-06-07  5:42     ` Dominik Brodowski
2011-06-07  6:01       ` Dominik Brodowski
2011-07-14  1:53       ` Len Brown
2011-07-16 22:49         ` [PATCH, RESEND] acpi-cpufreq: remove unreliable optional device.get() code Len Brown
2011-07-17 14:59           ` Dominik Brodowski [this message]
2011-07-21  9:48           ` Thomas Renninger

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=20110717145918.GA32223@comet.dominikbrodowski.net \
    --to=linux@dominikbrodowski.net \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@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