Re: Not able to scale the cpu-frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Haug <martinhaug <at> piratenpartei.de> writes:

> ... 
> [icehawk <at> icehawk-laptop linuxhome]$ sudo cpufreq-set -c 1 --g userspace
> -u 2000000
> [icehawk <at> icehawk-laptop linuxhome]$ sudo cpufreq-set -c 0 --g userspace
> -u 2000000
> [icehawk <at> icehawk-laptop linuxhome]$ sudo cpufreq-info
> ...
>   current policy: *frequency should be within 1000 MHz and 1000 MHz*.
> ...
This is not right for both CPUs.
It should be in your case:
   current policy: *frequency should be within 1000 MHz and 2000 MHz*.

So, I am testing and verifying it on my machine (also Intel dual core).

Please do the following:
# /etc/init.d/cpuspeed stop
# lsmod |grep -i cpu
acpi_cpufreq            6285  1 
mperf                   1141  1 acpi_cpufreq
Note: no cpufreq_ondemand module

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
userspace

# cpufreq-set -c 0 -u 2GHz
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
2000000
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
1000000

# cpufreq-set -c 1 -u 2GHz
# cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 
2000000
# cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
1000000

Verify:
# cpufreq-info
...
  current policy: frequency should be within 1000 MHz and 2 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
...

You should get this for both CPUs.

Now, set your desired working freqency ('cpufreq-set --help'):
# cpufreq-set -c 0 -f 1.5GHz
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
1500000

# cpufreq-set -c 1 -f 1.5GHz
# cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed
1500000

Verify:
# grep -i mhz /proc/cpuinfo
cpu MHz		: 1500.000
cpu MHz		: 1500.000

# cpufreq-info
...
  current policy: frequency should be within 1000 MHz and 2 GHz.
                  The governor "userspace" may decide which speed to use
                  within this range.
  current CPU frequency is 1.50 GHz (asserted by call to hardware).
...

You should get this for both CPUs.

Now do your stress test :-)

PS.
Some docs to read:
$ yum install kernel-doc
$ less /usr/share/doc/kernel-doc-2.6.35.10/Documentation/cpu-freq/user-guide.txt 
...
2.1 Policy
----------

On these systems, all you can do is select the lower and upper
frequency limit as well as whether you want more aggressive
power-saving or more instantly available processing power.

2.2 Governor
------------

On all other cpufreq implementations, these boundaries still need to
be set. Then, a "governor" must be selected. Such a "governor" decides
what speed the processor shall run within the boundaries. One such
"governor" is the "userspace" governor. This one allows the user - or
a yet-to-implement userspace program - to decide what specific speed
the processor shall run at.

3. How to change the CPU cpufreq policy and/or speed
...

If you have selected the "userspace" governor which allows you to
set the CPU operating frequency to a specific value, you can read out
the current frequency in

scaling_setspeed.               By "echoing" a new frequency into this
                                you can change the speed of the CPU,
                                but only within the limits of
                                scaling_min_freq and scaling_max_freq.

JB


-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux