On Thursday, 5 March 2020 00:28:21 GMT Walter Dnes wrote:
>   I've cobbled together a script to select cpu governors and speeds.
> One weird thing I've noticed is that reported cpu speed doesn't quite
> match the selected speed.  E.g. on my machine (yours will vary)...
> 
> cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
> 
> ...shows avalable speeds...
> 
> 3001000 3000000 2900000 2800000 2700000 2600000 2500000 2400000 2300000
> 2200000 2100000 2000000 1900000 1800000 1700000 1600000
> 
>   ***IMPORTANT*** "userspace" governor must be present.
> 
>   /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq reports speeds
> very close to, but slightly lower than the selected values, and they also
> seem to jump around a bit.  What gives?

My reported CPU frequency is also slightly lower than the values reported in 
'scaling_available_frequencies' and it fluctuates as the load on the CPU 
varies.  I take these values to be rounded upper limits, rather than what the 
CPU will be pegged at.

MoBo firmware plus kernel options seem to control (limit) the CPU frequency.  
I was installing Gentoo on a laptop, using a minimal CD and the CPU thermal 
cut out would kick in every time I tried to install packages shutting down the 
PC.  The frequency at the time reached 3600-3900MHz.  After I completed the 
install by limiting jobs and using an external cooling fan, I booted with my 
own newly configured kernel.  I felt disappointed to notice the frequency 
would never go above 2500, no matter what scaling_governor I used and what max 
frequency I selected.  I also tried using sys-power/cpupower to manipulate 
governors and frequencies, but nothing would change this hard limit of 
2500MHz.

I can't recall what the LiveCD was missing in the kernel/packages - it might 
have been acpi-freq.  This is the current state of affairs: 

$ 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: 4.0 us
  hardware limits: 1.40 GHz - 2.50 GHz
  available frequency steps:  2.50 GHz, 2.10 GHz, 1.80 GHz, 1.40 GHz
  available cpufreq governors: ondemand userspace performance schedutil
  current policy: frequency should be within 1.40 GHz and 2.50 GHz.
                  The governor "schedutil" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 1.31 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

Anyway, since I couldn't push it above 2500MHz, I've left it alone running on 
schedutil and it never overheats or cuts out.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to