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:
Jung-uk Kim 2011-04-12 22:41:52 +00:00
parent dd3e254ebd
commit e94d5ad227
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220581

View file

@ -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 {