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_setspeed
file?$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_setspeed 1600000 800000 $ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq 1595928 1595926
Why 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
True Frequency (without accounting Turbo) 680 MHz
, doesn't say which core it is. – Tim Jan 25 '18 at 22:55watch grep \"cpu MHz\" /proc/cpuinfo
shows realtime cpu frequency https://unix.stackexchange.com/questions/87522/why-do-cpuinfo-cur-freq-and-proc-cpuinfo-report-different-numbers – Tim Jan 25 '18 at 22:57i7z
work on T400? – Tim Jan 25 '18 at 22:58