Messages in this thread | | | Date | Tue, 14 Jul 2009 16:37:32 +0200 | Subject | Re: [PATCH] cpufreq: ondemand: Introduces stepped frequency increase | From | Corrado Zoccolo <> |
| |
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 -------------------------------------------------------------------------- "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
| |