From: Dan Magenheimer Subject: RE: write_tsc in a PV domain? Date: Fri, 28 Aug 2009 08:16:21 -0700 (PDT) Message-ID: References: <20090828104915.56cf1002@lxorguk.ukuu.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090828104915.56cf1002@lxorguk.ukuu.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Alan Cox Cc: Jeremy Fitzhardinge , "Xen-Devel (E-mail)" , Keir Fraser List-Id: xen-devel@lists.xenproject.org Hi Alan -- > > No, I don't think this is true. An enterprise app that=20 > binds processes > > to fixed physical processors on a physical machine can make > > assumptions about the results of rdtsc that aren't valid when > > the vcpus can skip between pcpus. Further, like Linux itself, >=20 > They rarely make the right assumptions I freely admit that there are a high percentage of apps-that-use-rdtsc that are at risk of being buggy if moved from a "tsc safe" machine to a "tsc unsafe" machine. But, echoing your earlier reply, there are some that are careful and smart about using rdtsc. Jeremy's claim is that because some apps-that-use- rdtsc risk bugginess, Xen can claim rdtsc for its own use and effectively disallow all uses of rdtsc in any app by breaking the existing, sometimes-useful semantics of the instruction. > > True, but any app that tries to run on a NUMA machine without > > being aware of the idiosyncracies of a NUMA machine probably > > has worse problems to deal with than tsc sync. Further, there >=20 > Disagree - this is true if your NUMA factor is large but quite a few > machines today are "vaguely NUMA" - the NUMA factor is low=20 > enough the app > doesn't need to care. Anyway you don't need NUMA to see TSC=20 > skew between cores. Yes, but I think we are agreeing here. My point, poorly made I admit, is that there are a lot of different machine topologies and we can't force all applications to conform to the lowest common denominator.