diff options
author | mav <mav@FreeBSD.org> | 2014-01-09 10:44:27 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-01-09 10:44:27 +0000 |
commit | 211b1cf42356decddcba5efbedb79cb2808e57ac (patch) | |
tree | 92fa7f5008f773db41aa28b95a4b90810185e16c | |
parent | dd0e0d7345725365b13093acb46d43a16ddd2679 (diff) | |
download | FreeBSD-src-211b1cf42356decddcba5efbedb79cb2808e57ac.zip FreeBSD-src-211b1cf42356decddcba5efbedb79cb2808e57ac.tar.gz |
MFC r259197:
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.
-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) |