From owner-svn-src-all@FreeBSD.ORG Fri Jun 22 08:11:38 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DC40106564A; Fri, 22 Jun 2012 08:11:38 +0000 (UTC) (envelope-from theraven@theravensnest.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id EB8488FC16; Fri, 22 Jun 2012 08:11:37 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q5M7fh02050990 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 22 Jun 2012 07:41:45 GMT (envelope-from theraven@theravensnest.org) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120622073455.GE69382@alchemy.franken.de> Date: Fri, 22 Jun 2012 08:41:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201206220713.q5M7DVH0063098@svn.freebsd.org> <20120622073455.GE69382@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1257) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Konstantin Belousov Subject: Re: svn commit: r237434 - in head/lib/libc: amd64/sys gen i386/sys include sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2012 08:11:38 -0000 On 22 Jun 2012, at 08:34, Marius Strobl wrote: > I don't know much about x86 CPUs but is my understanding correct > that TSCs are not synchronized in any way across CPUs, i.e. > reading it on different CPUs may result in time going backwards > etc., which is okay for this application though? As long as the initial value is set on every context switch, it only = matters that the TSC is monotonic and increments at an approximately = constant rate. It is also possible to set the TSC value, but that's = less useful in this context. The one thing to be careful about is the fact that certain power saving = states will affect the speed at which the TSC increments, and so it is = important to update the ticks-per-second value whenever a core goes into = a low power state. This is more or less the same approach used by Xen, so most of the = issues have been ironed out: Oracle complained to CPU vendors about a = few corner cases and, because Oracle customers tend to buy a lot of = expensive Xeon and Opteron chips, they were fixed quite promptly. =20 David