mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 00:33:57 +00:00
Do not use TSC for DELAY(9) if it not P-state invariant to avoid possible
foot-shooting. DELAY() becomes unreliable when TSC frequency varies wildly, especially cpufreq(4) and powerd(8) are used at the same time.
This commit is contained in:
parent
dd3e254ebd
commit
e94d5ad227
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220581
|
@ -263,7 +263,7 @@ delay_tc(int n)
|
|||
|
||||
tc = timecounter;
|
||||
freq = atomic_load_acq_64(&tsc_freq);
|
||||
if (freq != 0) {
|
||||
if (tsc_is_invariant && freq != 0) {
|
||||
func = get_tsc;
|
||||
mask = ~0u;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue