From: Corrado Zoccolo <czoccolo@gmail.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: Dave Jones <davej@redhat.com>,
linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org
Subject: Re: [PATCH] cpufreq: ondemand: Introduces stepped frequency increase
Date: Tue, 14 Jul 2009 16:37:32 +0200 [thread overview]
Message-ID: <4e5e476b0907140737g74220bb1n42ceba5d8c8aa92a@mail.gmail.com> (raw)
In-Reply-To: <20090708174741.GA23487@srcf.ucam.org>
[-- Attachment #1: Type: text/plain, Size: 2539 bytes --]
On Wed, Jul 8, 2009 at 7:47 PM, Matthew Garrett<mjg@redhat.com> wrote:
> On Wed, Jul 08, 2009 at 07:41:23PM +0200, Corrado Zoccolo wrote:
>> Hi Matthew,
>> > Is this a measured powersaving? The ondemand model is based on the
>> > assumption that the idle state is disproportionately lower in power than
>> > any running state, and therefore it's more sensible to run flat out for
>> > short periods of time than run at half speed for longer. Is this
>> > inherently flawed, or is it an artifact of differences in your processor
>> > design?
>>
>> The flawed assumption is that running at doubled frequency halves the
>> completion time.
>> On cpus that can change the core speed without impacting the
>> memory-cache bandwidth
>> (i.e. the Pentium M), workloads that access lot of memory go at the
>> same speed at
>> maximum and minimum frequency.
>> Now I see new CPUs that can flush their cache during deep idle states (Atoms),
>> this aggravates the aforementioned problem, rendering the high
>> frequency state much less appetible.
>
> Do you have numbers to support this? What effect does the ramping up
> have on user-visible latency?
I have the numbers now (see attached).
On my Pentium M machine, I run twice the following test, one with
freq_step = 100, and one with 5, sampling the remaining capacity every
20 minutes, for 12 samples.
* booted from battery after full discharge and full recharge.
* started firefox (with empty page)
* run the script:
for cpu in /sys/devices/system/cpu/cpu[0]/; do
# reset to defaults for my system
cat $cpu/cpufreq/phc_default_vids > $cpu/cpufreq/phc_vids
echo ondemand > $cpu/cpufreq/scaling_governor
echo 0 > $cpu/cpufreq/ondemand/ignore_nice_load
echo 20000 > $cpu/cpufreq/ondemand/sampling_rate
done
for cpu in /sys/devices/system/cpu/cpu[0]/; do
echo $1 > $cpu/cpufreq/ondemand/freq_step;
done
killall xscreensaver
sync
xrandr --output LVDS --off
for i in `seq 0 11`; do
cat /proc/acpi/battery/BAT*/state > test.$1.$i.bat
sleep 1200
done
xrandr --output LVDS --auto
shutdown -h now
The attached tsv shows that freq_step=5 saves around 1%-2% of power
with respect to freq_step=100 (default cpufreq behaviour).
>
> --
> Matthew Garrett | mjg59@srcf.ucam.org
>
--
__________________________________________________________________________
dott. Corrado Zoccolo mailto:czoccolo@gmail.com
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------
[-- Attachment #2: result.tsv --]
[-- Type: text/tab-separated-values, Size: 202 bytes --]
"sample" 5 100 "diff"
0 3960 3960 0
1 3800 3800 0
2 3680 3640 40
3 3560 3520 40
4 3400 3360 40
5 3240 3200 40
6 3120 3080 40
7 2960 2920 40
8 2840 2760 80
9 2680 2600 80
10 2520 2440 80
11 2360 2320 40
next prev parent reply other threads:[~2009-07-14 14:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 13:56 Corrado Zoccolo
2009-07-08 14:18 ` Michael S. Zick
2009-07-08 17:45 ` Corrado Zoccolo
2009-07-08 16:10 ` Matthew Garrett
2009-07-08 16:33 ` Pallipadi, Venkatesh
2009-07-08 18:05 ` Corrado Zoccolo
2009-07-08 17:41 ` Corrado Zoccolo
2009-07-08 17:47 ` Matthew Garrett
2009-07-14 14:37 ` Corrado Zoccolo [this message]
2009-07-09 23:34 ` Pavel Machek
2009-07-14 14:44 ` Corrado Zoccolo
2009-07-14 14:59 ` Matthew Garrett
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=4e5e476b0907140737g74220bb1n42ceba5d8c8aa92a@mail.gmail.com \
--to=czoccolo@gmail.com \
--cc=cpufreq@vger.kernel.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.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®