PERFORCE change 122735 for review

John Baldwin jhb at FreeBSD.org
Mon Jul 2 19:01:26 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=122735

Change 122735 by jhb at jhb_mutex on 2007/07/02 19:01:02

	'pause' in between reads of the TSC while spinning in DELAY().

Affected files ...

.. //depot/projects/smpng/sys/amd64/isa/clock.c#22 edit
.. //depot/projects/smpng/sys/i386/isa/clock.c#54 edit

Differences ...

==== //depot/projects/smpng/sys/amd64/isa/clock.c#22 (text+ko) ====

@@ -283,6 +283,7 @@
 		start = rdtsc();
 		end = start + (tsc_freq * n) / 1000000;
 		do {
+			cpu_spinwait();
 			now = rdtsc();
 		} while (now < end || (now > start && end < start));
 		sched_unpin();

==== //depot/projects/smpng/sys/i386/isa/clock.c#54 (text+ko) ====

@@ -288,6 +288,7 @@
 		start = rdtsc();
 		end = start + (tsc_freq * n) / 1000000;
 		do {
+			cpu_spinwait();
 			now = rdtsc();
 		} while (now < end || (now > start && end < start));
 		sched_unpin();


More information about the p4-projects mailing list