Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2012 22:23:51 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jim Harris <jim.harris@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon <avg@freebsd.org>, Bruce Evans <brde@optusnet.com.au>
Subject:   Re: svn commit: r238755 - head/sys/x86/x86
Message-ID:  <20120725192351.GR2676@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAJP=Hc9Ys6uou2wfcO=r9D%2BAaC34mVeHOK1bgFWtBz8kfvWo6A@mail.gmail.com>
References:  <201207242210.q6OMACqV079603@svn.freebsd.org> <500F9E22.4080608@FreeBSD.org> <20120725102130.GH2676@deviant.kiev.zoral.com.ua> <20120725233033.N5406@besplex.bde.org> <20120725173212.GN2676@deviant.kiev.zoral.com.ua> <CAJP=Hc9Ys6uou2wfcO=r9D%2BAaC34mVeHOK1bgFWtBz8kfvWo6A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--DPQvABvJ16HvCXZu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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@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.
>=20
> 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.

--DPQvABvJ16HvCXZu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlAQR8cACgkQC3+MBN1Mb4j+dQCgp7HrGcliuvwV1trGrXhrkND8
u7wAnRrJEgINxLU1l1fGSA5HB5F2LXpr
=jvTV
-----END PGP SIGNATURE-----

--DPQvABvJ16HvCXZu--



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