diff options
author | mav <mav@FreeBSD.org> | 2013-12-10 20:25:43 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2013-12-10 20:25:43 +0000 |
commit | bbaf4bdeea30a8f4bbf373e2daed378a817b96e4 (patch) | |
tree | a8db7d0cd78d6063dd30e4a7b5e005874d8cf92e /sys/x86 | |
parent | 885a4376b6245b0f13e45b17052b4662cf446631 (diff) | |
download | FreeBSD-src-bbaf4bdeea30a8f4bbf373e2daed378a817b96e4.zip FreeBSD-src-bbaf4bdeea30a8f4bbf373e2daed378a817b96e4.tar.gz |
Do not DELAY() for P-state transition unless we want to see the result.
Intel manual says: "If a transition is already in progress, transition to
a new value will subsequently take effect. Reads of IA32_PERF_CTL determine
the last targeted operating point." So seems it should be fine to just
trigger wanted transition and go. Linux does the same.
MFC after: 1 month
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/cpufreq/est.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/x86/cpufreq/est.c b/sys/x86/cpufreq/est.c index cc9502d..d8acfe6 100644 --- a/sys/x86/cpufreq/est.c +++ b/sys/x86/cpufreq/est.c @@ -1288,10 +1288,9 @@ est_set_id16(device_t dev, uint16_t id16, int need_check) msr = (msr & ~0xffff) | id16; wrmsr(MSR_PERF_CTL, msr); - /* Wait a short while for the new setting. XXX Is this necessary? */ - DELAY(EST_TRANS_LAT); - if (need_check) { + /* Wait a short while and read the new status. */ + DELAY(EST_TRANS_LAT); est_get_id16(&new_id16); if (new_id16 != id16) { if (bootverbose) |