From: Andrew Cooper Subject: Re: [PATCH 3/8] x86/time: introduce and use rdtsc_ordered() Date: Mon, 20 Jun 2016 13:59:46 +0100 Message-ID: <206387df-d279-d23c-b796-4e124acaf1da@citrix.com> References: <576140F302000078000F52FE@prv-mh.provo.novell.com> <576149AB02000078000F539D@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7204889045019273661==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEynu-0007Ua-CU for xen-devel@lists.xenproject.org; Mon, 20 Jun 2016 12:59:50 +0000 In-Reply-To: <576149AB02000078000F539D@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich , xen-devel Cc: Dario Faggioli , Joao Martins List-Id: xen-devel@lists.xenproject.org --===============7204889045019273661== Content-Type: multipart/alternative; boundary="------------7D958C03DF3008C3E53677EC" --------------7D958C03DF3008C3E53677EC Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit 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). > > Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --------------7D958C03DF3008C3E53677EC Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 7bit
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).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
--------------7D958C03DF3008C3E53677EC-- --===============7204889045019273661== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============7204889045019273661==--