Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2012 20:12:16 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jim Harris <jim.harris@gmail.com>
Cc:        "amd64@freebsd.org" <amd64@freebsd.org>, Andriy Gapon <avg@freebsd.org>
Subject:   Re: Use fences for kernel tsc reads.
Message-ID:  <20120728171216.GK2676@deviant.kiev.zoral.com.ua>
In-Reply-To: <CAJP=Hc8HSh9tsvFhShOP29=o0zV3ngi0gVyx-RQg%2BToCk_TdRA@mail.gmail.com>
References:  <20120728160202.GI2676@deviant.kiev.zoral.com.ua> <CAJP=Hc8HSh9tsvFhShOP29=o0zV3ngi0gVyx-RQg%2BToCk_TdRA@mail.gmail.com>

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

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

On Sat, Jul 28, 2012 at 09:36:43AM -0700, Jim Harris wrote:
> On Saturday, July 28, 2012, Konstantin Belousov wrote:
>=20
> > Hi,
> >
> > This was discussed on somewhat unwieldly thread on svn-src@ as a follow=
up
> > to the commit r238755 which uncovered the problem in the first place.
> >
> > Below is the commit candidate. It changes the fix in r238755 to use CPU=
ID
> > instead of rmb(), since rmb() translates to locked operation on i386,
> > and experimentation shown that Nehalem's RDTSC can pass LOCK.
> >
> > Also, I explicitely use LFENCE and MFENCE instead using rmb() and mb(),
> > for the same reason that on i386 implementation of *mb() is a locked
> > operation instead of fence.
> >
> > Jim, could you please, recheck that on your machine there is no regress=
ion
> > in the TSC synchronization test ?
> >
> Ok. I will do this first thing on Monday. Should I still MFC my patch to
> stable-9?

Definitely, please merge. I do not think that SMP && !SSE2 is important
population for us, and since SMP machines of that kind were definitely
multi-socket, I doubt that TSC was synchronized for them anyway. Users
will need to disable tsc manually.


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

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

iEYEARECAAYFAlAUHXAACgkQC3+MBN1Mb4gh2ACdHZRNWFg6/mRRoCma1QbbXERb
E94AoOabrODg9s2idvR24ALDlZCWOxyV
=JUhS
-----END PGP SIGNATURE-----

--USf1PyUzamLyyBMw--



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