Author: jkim Date: Tue Apr 12 22:41:52 2011 New Revision: 220581 URL: http://svn.freebsd.org/changeset/base/220581
Log: 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. Modified: head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Apr 12 22:22:01 2011 (r220580) +++ head/sys/x86/isa/clock.c Tue Apr 12 22:41:52 2011 (r220581) @@ -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 { _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"