Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2007 19:01:24 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 122735 for review
Message-ID:  <200707021901.l62J1OrU085496@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122735

Change 122735 by jhb@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();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707021901.l62J1OrU085496>