目录
环境:
redhat7系列
问题现象:
加载 ACPI CPUfreq 驱动程序时出现以下错误
报错一:
# modprobe acpi_freq
modprobe: FATAL: Module acpi_freq not found.
报错二:
# modprobe acpi-cpufreq
FATAL: Error inserting acpi_cpufreq (/lib/modules/2.6.32-220.13.1.el6.x86_64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko): No such device
在某些情况下,在启动时观察到以下消息:
kernel: p4-clockmod: Warning: EST-capable CPU detected. The acpi-cpufreq
module offers voltage scaling in addition of frequency scaling. You
should use that instead of p4-clockmod, if possible.
解决方法:
- 首先,确保系统 BIOS 配置为允许操作系统控制 CPU 电源管理。
例如:在HP ProLiant DL380 Gen10硬件的情况下,请按照以下方法操作
系统配置---> BIOS ---> 电源管理,然后将“电源配置文件”更改为自定义,将电源调节器更改为“操作系统控制模式”
注意:在硬件不同的情况下,上述方式会有所不同,主要目的只是将电源管理的控制权切换到操作系统。
- 第二个添加 intel_pstate=disable 作为内核命令行参数
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel_hp/root rd.lvm.lv=rhel_hp/swap intel_pstate=disable console=ttyS0,115200"
验证 /proc/cmdline 文件中是否存在 intel_pstate=disable 参数:
# grep intel_pstate /proc/cmdline
诊断步骤:
- 以下 CPUfreq 模块可用
$ ls /lib/modules/<kernel-version>/kernel/drivers/cpufreq
acpi-cpufreq.ko.xz amd_freq_sensitivity.ko.xz cpufreq_stats.ko.xz p4-clockmod.ko.xz pcc-cpufreq.ko.xz powernow-k8.ko.xz speedstep-lib.ko.xz
- 最初显示以下输出
$ cpupower frequency-info
analyzing 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.
hardware limits: Not Available
[..........]
$ cpupower frequency-info
analyzing CPU 0:
driver: intel_pstate <<------
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: Cannot determine or is not supported.
hardware limits: 1.20 GHz - 2.40 GHz
available cpufreq governors: conservative userspace powersave ondemand performance
current policy: frequency should be within 1.20 GHz and 2.40 GHz.
The governor "performance" may decide which speed to use
[..................]
遵循解决方案后,我们可以从下面的命令输出中确认 ACPI CPUfreq 模块已加载
$ 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: 1.20 GHz - 2.40 GHz
available frequency steps: 2.40 GHz, 2.40 GHz, 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz
available cpufreq governors: conservative userspace powersave ondemand performance
current policy: frequency should be within 1.20 GHz and 2.40 GHz.
The governor "performance" may decide which speed to use
[........]