为什么 cpupower 会根据我是否是 root 而报告不同的速度和设置?

为什么 cpupower 会根据我是否是 root 而报告不同的速度和设置?

在 Debian 11 上,运行 cpupower 时,如果我以 root 身份运行,而不是以普通用户身份运行,则会产生不同的当前 CPU 频率

以 root 身份运行,我看到 CPU 设置为 3.4ghz:

debian@dowest:~$ sudo 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: 800 MHz - 3.40 GHz
  available frequency steps:  3.40 GHz, 3.40 GHz, 3.20 GHz, 3.00 GHz, 2.80 GHz, 2.70 GHz, 2.50 GHz, 2.30 GHz, 2.10 GHz, 1.90 GHz, 1.70 GHz, 1.50 GHz, 1.40 GHz, 1.20 GHz, 1000 MHz, 800 MHz
  available cpufreq governors: performance schedutil
  current policy: frequency should be within 800 MHz and 3.40 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: 3.40 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes

以普通用户身份运行,除当前 CPU 行(返回两行)外,所有内容都相同:

  current CPU frequency: Unable to call hardware
  current CPU frequency: 4.50 GHz (asserted by call to kernel)

查看 /proc/cpuinfo 我看到 4500mhz:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 158
model name  : Intel(R) Xeon(R) E-2236 CPU @ 3.40GHz
stepping    : 10
microcode   : 0xf0
cpu MHz     : 4498.984

然而,使用 turbostat 我看到 Bzy_MHz 为 4500,而 TSC_MHz 为 3400,这让我更加困惑。(剪掉了很多输出):

Core    CPU Avg_MHz Busy%   Bzy_MHz TSC_MHz IRQ
-   -   65  1.45    4500    3408    61404
0   0   92  2.05    4500    3408    5193

那么问题是。处理器的运行速度是多少?如果我想始终将其锁定在更高的频率(4500),我该怎么做?

相关内容