Desde minha pergunta anterior sobre esse tópico , atualizei meu kernel algumas vezes e me deparei com outro problema : cpupower não parece mostrar e definir a frequência da cpu de forma confiável.
Primeiro, algumas informações:
# uname -a
Linux yoga 4.0.5-gentoo #3 SMP Tue Jul 21 08:43:04 HKT 2015 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux
# cpupower frequency-info
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 782 MHz - 1.70 GHz
available frequency steps: 1.70 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz, 1.10 GHz, 1000 MHz, 900 MHz, 800 MHz, 782 MHz
available cpufreq governors: conservative, ondemand, powersave, userspace, performance
current policy: frequency should be within 782 MHz and 1.70 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 1.70 GHz (asserted by call to hardware).
cpufreq stats: 1.70 GHz:90.12%, 1.70 GHz:0.00%, 1.60 GHz:0.64%, 1.50 GHz:0.00%, 1.40 GHz:0.00%, 1.30 GHz:0.00%, 1.20 GHz:0.00%, 1.10 GHz:0.00%, 1000 MHz:0.00%, 900 MHz:0.00%, 800 MHz:0.00%, 782 MHz:9.25% (267)
boost state support:
Supported: yes
Active: yes
2400 MHz max turbo 4 active cores
2400 MHz max turbo 3 active cores
2400 MHz max turbo 2 active cores
2600 MHz max turbo 1 active cores
E agora as coisas estranhas:
# cpupower frequency-info|grep -P "The governor|CPU frequency"
The governor "performance" may decide which speed to use
current CPU frequency is 1.70 GHz (asserted by call to hardware).
# grep MHz /proc/cpuinfo
cpu MHz : 1701.000
cpu MHz : 1701.000
cpu MHz : 1701.000
cpu MHz : 1701.000
# cpupower frequency-set -f 800
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
# cpupower frequency-info|grep -P "The governor|CPU frequency"
The governor "userspace" may decide which speed to use
current CPU frequency is 1.70 GHz (asserted by call to hardware).
# grep MHz /proc/cpuinfo
cpu MHz : 782.000
cpu MHz : 782.000
cpu MHz : 782.000
cpu MHz : 782.000
# cpupower frequency-set -f 1700
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
# cpupower frequency-info|grep -P "The governor|CPU frequency"
The governor "userspace" may decide which speed to use
current CPU frequency is 1.70 GHz (asserted by call to hardware).
# grep MHz /proc/cpuinfo
cpu MHz : 782.000
cpu MHz : 782.000
cpu MHz : 782.000
cpu MHz : 782.000
# cpupower frequency-set -g performance
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
# cpupower frequency-info|grep -P "The governor|CPU frequency"
The governor "performance" may decide which speed to use
current CPU frequency is 1.70 GHz (asserted by call to hardware).
# grep MHz /proc/cpuinfo
cpu MHz : 1701.000
cpu MHz : 1701.000
cpu MHz : 1701.000
cpu MHz : 1701.000
Para resumir:
- Quando eu defino a freqüência para 800, o cpupower define para 782, e diz que ainda é 1700 (afirmado pela chamada para o hardware!)
- Quando eu definir a frequência de volta para 1700, o cpupower não faz nada (e ainda diz que é 1700)
- Quando eu configuro o regulador para "performance", o cpupower finalmente define a frequência para 1700
Existe uma maneira de fazer com que o cpupower funcione de forma confiável? Ou é um bug?