From owner-freebsd-amd64@FreeBSD.ORG Sat Jul 28 17:12:32 2012 Return-Path: Delivered-To: amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7590D106564A; Sat, 28 Jul 2012 17:12:32 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id E1EA58FC08; Sat, 28 Jul 2012 17:12:31 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q6SHCT4j033902; Sat, 28 Jul 2012 20:12:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q6SHCGST026249; Sat, 28 Jul 2012 20:12:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q6SHCGu3026248; Sat, 28 Jul 2012 20:12:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Jul 2012 20:12:16 +0300 From: Konstantin Belousov To: Jim Harris Message-ID: <20120728171216.GK2676@deviant.kiev.zoral.com.ua> References: <20120728160202.GI2676@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="USf1PyUzamLyyBMw" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: "amd64@freebsd.org" , Andriy Gapon Subject: Re: Use fences for kernel tsc reads. X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jul 2012 17:12:32 -0000 --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--