public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* acpi-cpufreq; Intel Johnstown (Atom N270)
@ 2009-08-13 17:25 Forest Bond
  2009-08-13 18:29 ` Forest Bond
  0 siblings, 1 reply; 4+ messages in thread
From: Forest Bond @ 2009-08-13 17:25 UTC (permalink / raw)
  To: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 851 bytes --]

Hi,

I'm using an Intel Johnstown board with an Atom N270 processor.  Performance
seems to improve dramatically with acpi-cpufreq loaded.  This caught me by
surprise.  I had assumed that without loading acpi-cpufreq the CPU would be
running at its maximum speed all the time.

I have a few questions:

* Is it normal for performance to improve with acpi-cpufreq loaded?
* /proc/cpuinfo always reports the CPU's maximum clock speed when acpi-cpufreq
  is not loaded, which seems to be inconsistent with my performance
  observations.  Does that seem normal?
* Does acpi-cpufreq impact performance in any way besides controlling CPU
  frequency?
* What governs CPU frequency when acpi-cpufreq is not loaded?

Any input would be appreciated.

Thanks,
Forest
-- 
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: acpi-cpufreq; Intel Johnstown (Atom N270)
  2009-08-13 17:25 acpi-cpufreq; Intel Johnstown (Atom N270) Forest Bond
@ 2009-08-13 18:29 ` Forest Bond
  2009-08-13 19:07   ` Dave Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Forest Bond @ 2009-08-13 18:29 UTC (permalink / raw)
  To: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 6097 bytes --]

Hi,

On Thu, Aug 13, 2009 at 01:25:57PM -0400, Forest Bond wrote:
> I'm using an Intel Johnstown board with an Atom N270 processor.  Performance
> seems to improve dramatically with acpi-cpufreq loaded.  This caught me by
> surprise.  I had assumed that without loading acpi-cpufreq the CPU would be
> running at its maximum speed all the time.

I ran some tests to get some numbers.  My findings indicate that before
acpi-cpufreq is loaded the CPU is running at 800MHz even though /proc/cpuinfo
indicates 1.6GHz.

My test just runs `yes | head -n10000000' and times the execution.  Three reps
are done for each set of conditions.  Here's a break down of the results:

======================= ============
Conditions              Average Time
----------------------- ------------
acpi-cpufreq not loaded 2.641s

acpi-cpufreq loaded     1.349s
performance governor

acpi-cpufreq loaded     2.640s
userspace governor
scaling_max_freq 800000
======================= ============

Actual results follow.

Here's my test script:

  #!/bin/bash
  
  set -o xtrace
  
  for rep in 1 2 3; do
    grep '^cpu MHz' /proc/cpuinfo
    uptime
    time yes | head -n10000000 >/dev/null
  done


Results without acpi-cpufreq:

  root@platform:~# ./test.sh
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 1596.060
  cpu MHz         : 1596.060
  + uptime
   18:08:37 up 6 min,  1 user,  load average: 0.06, 0.66, 0.43
  + yes
  + head -n10000000
  
  real    0m2.647s
  user    0m2.844s
  sys     0m0.420s
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 1596.060
  cpu MHz         : 1596.060
  + uptime
   18:08:40 up 6 min,  1 user,  load average: 0.13, 0.66, 0.43
  + yes
  + head -n10000000
  
  real    0m2.655s
  user    0m2.748s
  sys     0m0.528s
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 1596.060
  cpu MHz         : 1596.060
  + uptime
   18:08:43 up 6 min,  1 user,  load average: 0.13, 0.66, 0.43
  + yes
  + head -n10000000
  
  real    0m2.622s
  user    0m2.872s
  sys     0m0.428s


Then with acpi-cpufreq and the default performance governor:

  root@platform:~# modprobe acpi-cpufreq
  root@platform:~# ./test.sh
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 1600.000
  cpu MHz         : 1600.000
  + uptime
   18:09:11 up 6 min,  1 user,  load average: 0.13, 0.61, 0.42
  + yes
  + head -n10000000
  
  real    0m1.354s
  user    0m1.392s
  sys     0m0.240s
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 1600.000
  cpu MHz         : 1600.000
  + uptime
   18:09:12 up 6 min,  1 user,  load average: 0.13, 0.61, 0.42
  + yes
  + head -n10000000
  
  real    0m1.339s
  user    0m1.440s
  sys     0m0.284s
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 1600.000
  cpu MHz         : 1600.000
  + uptime
   18:09:14 up 6 min,  1 user,  load average: 0.13, 0.61, 0.42
  + yes
  + head -n10000000
  
  real    0m1.354s
  user    0m1.404s
  sys     0m0.264s
  root@platform:~# grep '' /sys/devices/system/cpu/cpu0/cpufreq/*
  /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus:0 1
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:1600000
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq:1600000
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq:800000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies:1600000 1333000 1067000 800000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors:performance
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:1600000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver:acpi-cpufreq
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:performance
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq:1600000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq:800000


Then with the userspace governor and the frequency set to 800MHz:

  root@platform:~# modprobe cpufreq_userspace
  root@platform:~# echo 800000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  root@platform:~# grep '' /sys/devices/system/cpu/cpu0/cpufreq/*
  /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus:0 1
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq:800000
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq:1600000
  /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq:800000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies:1600000 1333000 1067000 800000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors:userspace performance
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq:800000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver:acpi-cpufreq
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor:performance
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq:800000
  /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq:800000
  root@platform:~# echo 800000 >/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
  root@platform:~# ./test.sh
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 800.000
  cpu MHz         : 800.000
  + uptime
   18:12:32 up 9 min,  1 user,  load average: 0.00, 0.32, 0.34
  + yes
  + head -n10000000
  
  real    0m2.627s
  user    0m2.808s
  sys     0m0.496s
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 800.000
  cpu MHz         : 800.000
  + uptime
   18:12:35 up 10 min,  1 user,  load average: 0.00, 0.32, 0.34
  + yes
  + head -n10000000
  
  real    0m2.643s
  user    0m2.732s
  sys     0m0.544s
  + for rep in 1 2 3
  + grep '^cpu MHz' /proc/cpuinfo
  cpu MHz         : 800.000
  cpu MHz         : 800.000
  + uptime
   18:12:37 up 10 min,  1 user,  load average: 0.16, 0.34, 0.34
  + yes
  + head -n10000000
  
  real    0m2.651s
  user    0m2.848s
  sys     0m0.424s

Thoughts?

-Forest
-- 
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: acpi-cpufreq; Intel Johnstown (Atom N270)
  2009-08-13 18:29 ` Forest Bond
@ 2009-08-13 19:07   ` Dave Jones
  2009-08-13 19:09     ` Forest Bond
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2009-08-13 19:07 UTC (permalink / raw)
  To: Forest Bond; +Cc: linux-acpi

On Thu, Aug 13, 2009 at 02:29:08PM -0400, Forest Bond wrote:
 > Hi,
 > 
 > On Thu, Aug 13, 2009 at 01:25:57PM -0400, Forest Bond wrote:
 > > I'm using an Intel Johnstown board with an Atom N270 processor.  Performance
 > > seems to improve dramatically with acpi-cpufreq loaded.  This caught me by
 > > surprise.  I had assumed that without loading acpi-cpufreq the CPU would be
 > > running at its maximum speed all the time.
 > 
 > I ran some tests to get some numbers.  My findings indicate that before
 > acpi-cpufreq is loaded the CPU is running at 800MHz even though /proc/cpuinfo
 > indicates 1.6GHz.

if no cpufreq modules have been loaded, the CPU will be running at whatever
p-state the BIOS programmed it to start up at. In your case for some reason, that's
the 'slow' speed. 

	Dave


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: acpi-cpufreq; Intel Johnstown (Atom N270)
  2009-08-13 19:07   ` Dave Jones
@ 2009-08-13 19:09     ` Forest Bond
  0 siblings, 0 replies; 4+ messages in thread
From: Forest Bond @ 2009-08-13 19:09 UTC (permalink / raw)
  To: Dave Jones; +Cc: linux-acpi

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]

Hi,

On Thu, Aug 13, 2009 at 03:07:41PM -0400, Dave Jones wrote:
> On Thu, Aug 13, 2009 at 02:29:08PM -0400, Forest Bond wrote:
>  > Hi,
>  > 
>  > On Thu, Aug 13, 2009 at 01:25:57PM -0400, Forest Bond wrote:
>  > > I'm using an Intel Johnstown board with an Atom N270 processor.  Performance
>  > > seems to improve dramatically with acpi-cpufreq loaded.  This caught me by
>  > > surprise.  I had assumed that without loading acpi-cpufreq the CPU would be
>  > > running at its maximum speed all the time.
>  > 
>  > I ran some tests to get some numbers.  My findings indicate that before
>  > acpi-cpufreq is loaded the CPU is running at 800MHz even though /proc/cpuinfo
>  > indicates 1.6GHz.
> 
> if no cpufreq modules have been loaded, the CPU will be running at whatever
> p-state the BIOS programmed it to start up at. In your case for some reason, that's
> the 'slow' speed. 

Okay, that's what I figured.

Looks like there's some BIOS settings that may have an effect.  I'll play with
those.

Thanks,
Forest
-- 
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-13 19:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-13 17:25 acpi-cpufreq; Intel Johnstown (Atom N270) Forest Bond
2009-08-13 18:29 ` Forest Bond
2009-08-13 19:07   ` Dave Jones
2009-08-13 19:09     ` Forest Bond

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox