From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 3/8] x86/time: introduce and use rdtsc_ordered() Date: Mon, 11 Jul 2016 13:39:24 +0200 Message-ID: <1468237164.13039.4.camel@citrix.com> References: <576140F302000078000F52FE@prv-mh.provo.novell.com> <576149AB02000078000F539D@prv-mh.provo.novell.com> <206387df-d279-d23c-b796-4e124acaf1da@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9134243200655820493==" Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMZYt-0004tP-3w for xen-devel@lists.xenproject.org; Mon, 11 Jul 2016 11:39:43 +0000 In-Reply-To: <206387df-d279-d23c-b796-4e124acaf1da@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Andrew Cooper , Jan Beulich , xen-devel Cc: Joao Martins List-Id: xen-devel@lists.xenproject.org --===============9134243200655820493== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-w789h0nmH4Rr97Bo5K/n" --=-w789h0nmH4Rr97Bo5K/n Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2016-06-20 at 13:59 +0100, Andrew Cooper wrote: > On 15/06/16 11:27, Jan Beulich wrote: > > Matching Linux commit 03b9730b76 ("x86/asm/tsc: Add rdtsc_ordered() > > and > > use it in trivial call sites") and earlier ones it builds upon, > > let's > > make sure timing loops don't have their rdtsc()-s re-ordered, as > > that > > would harm precision of the result (values were observed to be > > several > > hundred clocks off without this adjustment). > >=20 > > Signed-off-by: Jan Beulich > =C2=A0 > Reviewed-by: Andrew Cooper > FWIW: Reviewed-by: Dario Faggioli Tested-by: Dario Faggioli (or Reviewed-and-Tested-by: as you wish :-)). FTR, during my own investigation, before raising the issue on the mailing list, I also came to the conclusion that we'd need something like this. I even try doing something like this (in a much more hacky way), and had the feeling that it was making a difference but, of course, alone, without all the other issues that Jan found and fixed in this series, it wasn't enough. Thanks and regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-w789h0nmH4Rr97Bo5K/n Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXg4V0AAoJEBZCeImluHPuSPkQAJ6eIrDHirMPRYQpwM1Zl4cH ZfoL104Z1/HNwGDpu6/MSN+bwH0lgobOTadUNHlW6dXbA0ueK8FHf+VVlKq1WkKT 8QMOVD4/dAdfLs3DDt2qv/3H8OfdtmRwn/wE5UX4dHou41h0mmx8yCBBYnN4IudE D31U1bO48Nkmf2j913h3/m2o0Xwu1P8echB2KHAAM4lSaudDIn0b+uTlaJ+O5/uo jjUtYDmRTTXZ9dx+gZPpsgREVkx6FybU8aL1zRHXILf6ooqN2mActvaYjaDHf8Ti GFJutylWX6P9YK5QKquNeyGMnT3pSzp6dyh3u52xPca1ZrjXkdxhq3JboXNFLi3+ 2IaNKWvXMUgr+rz6OVmZbim1bRMAkVeK5myAK86tt2ZD6EJBcz/qAqffu4YENEuA YewHxPW/8MCoIqdvnUfXEEM8wKWgU+mCAHr6IC44NS88mzK86dBAlRerBzhzvwxe U8owdmgUfR28TLACKszMzFoIQrUUSlB6ubRA33FZCZWIgNQIeEGZdzQdtVv47y6Y luOt8SxDLOeNwzWCSl2cnvnKIPu53n2DZj/lYDVw8m8/RvylplYauXV+m61vf3dr 3ykGMtILdns2G/5hm08vXzLbsUideUQXAyCGELpEkJTI13WdnfKjRieyas6KQabE Pl+ZUbq5sAZ57IIHbzY7 =JLzs -----END PGP SIGNATURE----- --=-w789h0nmH4Rr97Bo5K/n-- --===============9134243200655820493== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============9134243200655820493==--