我有一台 Intel i9-7980XE 处理器。我尝试运行的应用程序要求我关闭 Intel P 状态和 C 状态。我通过修改以下内容来实现:
GRUB_CMDLINE_LINUX_DEFAULT="no splash intel_pstate=disable processor.max_cstate=1 intel_idle.max_cstate=0 idle=poll"
在 /etc/default/grub 里面。
然后它要求我安装 cpufrequtils 并通过在 sudo vi /etc/default/cpufrequtils 中添加以下行将调节器设置为性能:
GOVERNOR="performance"
禁用 P 状态并尝试重新启动 cpufrequtils 后,我得到以下信息:
sudo /etc/init.d/cpufrequtils restart
* CPUFreq Utilities: Setting performance CPUFreq governor... * disabled, governor not available...
cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 1:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 2:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 3:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 4:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 5:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 6:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 7:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 8:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 9:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 10:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 11:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 12:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 13:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 14:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 15:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 16:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
analyzing CPU 17:
no or unknown cpufreq driver is active on this CPU
maximum transition latency: 4294.55 ms.
我在许多论坛上看到,现代英特尔处理器需要启用 P-State 才能进行频率缩放。
我必须使用 Ubuntu 14.04,因为只有在这个 Ubuntu 版本中应用程序才被证明是稳定的。
那么,我怎样才能禁用 P 状态并仍然能够将调节器设置为性能?
答案1
您不需要禁用 intel_pstate CPU 频率调节驱动程序。
它有一个性能调节器(但这实际上与此无关)。
由于您已禁用除轮询之外的所有空闲状态,因此无论如何,您的所有 CPU 都应该始终以最大频率运行,至少如果您的系统可以处理产生的所有热量(并且这将消耗大量能量)。
顺便说一句,intel-pstate CPU 频率驱动程序并非必须使用,它只是默认设置,也是英特尔推荐的。任何人都可以根据自己的喜好使用 acpi-cpufreq CPU 缩放驱动程序。intel_pstate 驱动程序还有被动模式,它提供与 acpi-cpufreq 驱动程序相同的所有调节器。(但是,我不知道被动模式是否已反向移植到 14.04 中使用的任何内核。)
请注意,对 14.04 的支持将在大约一个月后结束。