From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver
Date: Thu, 15 Dec 2011 20:29:11 +0000 [thread overview]
Message-ID: <20111215202911.GL14542@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1323947798-25251-1-git-send-email-richard.zhao@linaro.org>
On Thu, Dec 15, 2011 at 07:16:35PM +0800, Richard Zhao wrote:
> +#ifdef CONFIG_SMP
> + /* loops_per_jiffy is not updated by the cpufreq core for SMP systems.
> + * So update it for all CPUs.
> + */
> + for_each_possible_cpu(cpu)
> + per_cpu(cpu_data, cpu).loops_per_jiffy =
> + cpufreq_scale(per_cpu(cpu_data, cpu).loops_per_jiffy,
> + freqs.old, freqs.new);
NAK. If you think this is a good solution, you're very wrong. If this
is what's in the core cpufreq code, then it too is very broken.
I've seen this exact method result in the loops_per_jiffy being totally
buggered over time by the constant scaling up and down. The only way
to do this _sensibly_ is to record the _initial_ loops_per_jiffy and
_inital_ frequency, and scale from that.
That way you get consistent results irrespective of the scalings you
do over time, rather than something which continually deteriorates with
every frequency change.
next prev parent reply other threads:[~2011-12-15 20:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-15 11:16 [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver Richard Zhao
2011-12-15 11:19 ` Richard Zhao
2011-12-15 18:50 ` Mark Langsdorf
2011-12-16 3:11 ` Richard Zhao
2011-12-16 8:24 ` Russell King - ARM Linux
2011-12-16 10:18 ` Richard Zhao
[not found] ` <1323947798-25251-2-git-send-email-richard.zhao@linaro.org>
2011-12-15 11:58 ` [RFC V1 2/4] dts/imx6q: add cpufreq property Shawn Guo
2011-12-16 2:47 ` Richard Zhao
2011-12-15 18:52 ` Mark Langsdorf
2011-12-15 20:29 ` Russell King - ARM Linux [this message]
2011-12-16 3:13 ` [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver Richard Zhao
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=20111215202911.GL14542@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).