svn commit: r238755 - head/sys/x86/x86

Konstantin Belousov kostikbel at gmail.com
Wed Jul 25 19:23:55 UTC 2012


On Wed, Jul 25, 2012 at 11:00:41AM -0700, Jim Harris wrote:
> On Wed, Jul 25, 2012 at 10:32 AM, Konstantin Belousov
> <kostikbel at gmail.com> wrote:
> > I also asked Jim to test whether the cause the TSC sync test failure
> > is the lack of synchronization between gathering data and tasting it,
> > but ut appeared that the reason is genuine timecounter value going
> > backward.
> 
> I wonder if instead of timecounter going backward, that TSC test
> fails because CPU speculatively performs rdtsc instruction in relation
> to waiter checks in smp_rendezvous_action.  Or maybe we are saying
> the same thing.

Ok, the definition of the 'timecounter goes back', as I understand it:

you have two events A and B in two threads, provable ordered, say, A is
a lock release and B is the same lock acquisition. Assume that you take
rdtsc values tA and tB under the scope of the lock right before A and
right after B. Then it should be impossible to have tA > tB.

I do not think that we can ever observe tA > tB if both threads are
executing on the same CPU.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120725/5d6ca91c/attachment.pgp


More information about the svn-src-all mailing list