My laptop Thinkpad T400 with Ubuntu 16.04 has two cpu cores cpu0 and cpu1.
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
797963
797963
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_setspeed
800000
800000
Then I edit /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed to change its content to 1600000, and then
Why is the realtime frequency of cpu1 also change, without changing its
scaling_setspeedfile?$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_setspeed 1600000 800000 $ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq 1595928 1595926Why does the following command show a different result than the above:
$ watch grep \"cpu MHz\" /proc/cpuinfo Every 2.0s: grep "cpu MHz" /proc/cpuinfo Thu Jan 25 17:31:01 2018 cpu MHz : 1600.000 cpu MHz : 800.000
Thanks.
It seems that changes should only affect the current core, not both:
$ cat /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus
0
$ cat /sys/devices/system/cpu/cpu1/cpufreq/affected_cpus
1