From: Dave Jones <davej@redhat.com>
To: Dominik Brodowski <linux@brodo.de>
Cc: cpufreq@www.linux.org.uk
Subject: Re: [PATCH 7/8] latency must be in _nano_seconds
Date: Wed, 19 Nov 2003 19:07:25 +0000 [thread overview]
Message-ID: <20031119190725.GA5653@redhat.com> (raw)
In-Reply-To: <20031119183330.GH20576@brodo.de>
On Wed, Nov 19, 2003 at 07:33:30PM +0100, Dominik Brodowski wrote:
> return cpufreq_frequency_table_cpuinfo(policy, &p4clockmod_table[0]);
> diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k7.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
> --- linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2003-11-19 17:06:10.571868800 +0100
> +++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k7.c 2003-11-19 18:48:10.150551432 +0100
> @@ -386,7 +386,7 @@
> minimum_speed, maximum_speed);
>
> policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
> - policy->cpuinfo.transition_latency = latency;
> + policy->cpuinfo.transition_latency = latency * 20;
> policy->cur = maximum_speed;
Can we at least get a comment explaining where '20' comes from
when we add magic numbers like this? I know, and you know, but
it's a little non-obvious, and in six months time, I'll probably
have forgotten too 8)
> diff -ruN linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
> --- linux-original/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2003-11-19 17:07:58.537455536 +0100
> +++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2003-11-19 18:46:57.031667192 +0100
> @@ -959,8 +959,8 @@
> pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
>
> /* Take a crude guess here. */
> - pol->cpuinfo.transition_latency = ((rvo + 8) * vstable * VST_UNITS_20US)
> - + (3 * (1 << irt) * 10);
> + pol->cpuinfo.transition_latency = (((rvo + 8) * vstable * VST_UNITS_20US)
> + + (3 * (1 << irt) * 10)) * 1000;
Ditto. This one moreso, as its quite complex to begin with.
Dave
next prev parent reply other threads:[~2003-11-19 19:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 18:33 [PATCH 7/8] latency must be in _nano_seconds Dominik Brodowski
2003-11-19 19:07 ` Dave Jones [this message]
2003-11-20 18:31 ` Dominik Brodowski
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=20031119190725.GA5653@redhat.com \
--to=davej@redhat.com \
--cc=cpufreq@www.linux.org.uk \
--cc=linux@brodo.de \
/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