Linux查看cpu实时频率的命令:linux:不能用cpupower设置cpu频率调节器 (ACPI故障)

使用 AMD Epyc CPU 的机器,内核 4.19.71(也尝试过 5.4.0),尝试设置 CPU 性能调节器失败:

# cpupower frequency-set -g performance
Setting cpu: 0
Error setting new values. Common errors:
- Do you have proper administration rights? (super-user?)
- Is the governor you requested available and modprobed?
- Trying to set an invalid policy?
- Trying to set a specific frequency, but userspace governor is not available,
   for example because of hardware which cannot be set to a specific frequency
   or because the userspace governor isn't loaded?
#

所以我开始排除故障:

# cpupower frequency-info
yzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  CPUs which run at the same hardware frequency: Not Available
  CPUs which need to have their frequency coordinated by software: Not Available
  maximum transition latency:  Cannot determine or is not supported.
Not Available
  available cpufreq governors: Not Available
  Unable to determine current policy
  current CPU frequency: Unable to call hardware
  current CPU frequency:  Unable to call to kernel
  boost state support:
    Supported: yes
    Active: yes
    Boost States: 0
    Total States: 3
    Pstate-P0:  2000MHz
    Pstate-P1:  1800MHz
    Pstate-P2:  1500MHz
#
# ls /sys/devices/system/cpu/cpufreq/
<Empty>
#
#

内核.config具有以下选项:

CONFIG_CPU_FREQ=y
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_INTEL_PSTATE=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y

所以,我花了一些时间来调试驱动程序的行为-drivers/cpufreq/cpufreq.cdrivers/cpufreq/acpi-cpufreq.c,发现acpi-cpufreq实际上失败了消息:

基于 ACPI 的处理器性能控制不可用

调用链如下:

cpufreq_add_dev()
  -> cpufreq_online(cpu)
        -> cpufreq_driver->init()  [*]
[*]
acpi_cpufreq_cpu_init()
   -> acpi_processor_register_performance()
         -> acpi_processor_get_performance_info()
             <return -EIO>

据我了解,在acpi_processor_get_performance_info()驱动程序尝试从ACPI表中读取_PCT对象并失败,因为找不到它。

这是否意味着 BIOS 没有完全支持 ACPI,或者 CPU 微码需要更新,或者内核缺少一些东西?

我很乐意任何建议。

本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处

(771)
维c精华推荐:推荐用于简单一维场景的异常检测技术
上一篇
Web easy mail:.net:System.Web.MailvsSystem.Net.Mail
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(20条)