svn commit: r357165 - head/sys/x86/cpufreq
Conrad Meyer
cem at FreeBSD.org
Mon Jan 27 06:04:33 UTC 2020
Author: cem
Date: Mon Jan 27 06:04:32 2020
New Revision: 357165
URL: https://svnweb.freebsd.org/changeset/base/357165
Log:
hwpstate(4): Log a debug line when throttled
If we're going to throttle user requested P-states, we should at least produce
a debug log line indicating the surprising behavior.
PR: inspired by 234733
Modified:
head/sys/x86/cpufreq/hwpstate_amd.c
Modified: head/sys/x86/cpufreq/hwpstate_amd.c
==============================================================================
--- head/sys/x86/cpufreq/hwpstate_amd.c Mon Jan 27 06:03:36 2020 (r357164)
+++ head/sys/x86/cpufreq/hwpstate_amd.c Mon Jan 27 06:04:32 2020 (r357165)
@@ -173,8 +173,12 @@ hwpstate_goto_pstate(device_t dev, int id)
/* get the current pstate limit */
msr = rdmsr(MSR_AMD_10H_11H_LIMIT);
limit = AMD_10H_11H_GET_PSTATE_LIMIT(msr);
- if (limit > id)
+ if (limit > id) {
+ HWPSTATE_DEBUG(dev,
+ "Restricting requested P%d to P%d due to HW limit\n", id,
+ limit);
id = limit;
+ }
cpu = curcpu;
HWPSTATE_DEBUG(dev, "setting P%d-state on cpu%d\n", id, cpu);
More information about the svn-src-head
mailing list