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
@ -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…
x
Reference in New Issue
Block a user