cpufreq-set option to set all related cpus?

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

 



Multi-core processors like the Core 2 Duo P8400 have an independent MSR
for each core, but constrain all cores to operate at the same frequency.
Basically, the hardware chooses to run all cores at the highest
frequency and voltage requested for any individual core.

cpufreq shows for the P8400:

# cat /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus
0
# cat /sys/devices/system/cpu/cpu0/cpufreq/related_cpus
0 1

For this processor, doing
# cpufreq-set -g userspace
# cpufreq-set -f 800MHz

sets constant 800MHz only for cpu0. If cpu1 governor remains set to
ondemand, both cpus will ramp up to cpuinfo_max_freq on demand, so the
previous two commands do not have the desired effect of limiting cpu0
frequency. Doing that would require 4 cpufreq-set commands:

# cpufreq-set -c 0 -g userspace
# cpufreq-set -c 0 -f 800MHz
# cpufreq-set -c 1 -g userspace
# cpufreq-set -c 1 -f 800MHz

which is rather cumbersome. It would be more convenient if cpufreq-set
could be used to set properties on all related cpus in a single command.
Some options for doing this:

1) If -c switch is not specified, then all related cores are modified.
This differs from current behavior and so may break stuff.

2) Use some special value of -c switch to specify "all related cores"

3) Add a new -r switch to specify "all related cores"

Thanks,
Frank
--
To unsubscribe from this list: send the line "unsubscribe cpufreq" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Devel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Forum]     [Linux SCSI]

  Powered by Linux