From: Dan Magenheimer Subject: RE: [RFC] Physical hot-add cpus and TSC Date: Thu, 10 Jun 2010 06:15:12 -0700 (PDT) Message-ID: <57ce3646-2718-4738-a7cf-5a4fcee2f788@default> References: <789F9655DD1B8F43B48D77C5D30659731E78D370@shsmsx501.ccr.corp.intel.com> <789F9655DD1B8F43B48D77C5D30659731E78D500@shsmsx501.ccr.corp.intel.com> <3c99c55d-68ce-4150-b895-72fda1ff3b89@default> <789F9655DD1B8F43B48D77C5D30659731E78D89D@shsmsx501.ccr.corp.intel.com 1A42CE6F5F474C41B63392A5F80372B21F26E619@shsmsx501.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1A42CE6F5F474C41B63392A5F80372B21F26E619@shsmsx501.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Dong, Eddie" , "Jiang, Yunhong" , Keir Fraser , "Xen-Devel (xen-devel@lists.xensource.com)" List-Id: xen-devel@lists.xenproject.org > From: Dong, Eddie [mailto:eddie.dong@intel.com] >=20 > > Below is test result: > > a) With the patch > > Before hotadd: > > (XEN) TSC marked as reliable, warp =3D 0 (count=3D3) > > (XEN) No domains have emulated TSC > > (XEN) TSC marked as reliable, warp =3D 0 (count=3D4) > > (XEN) No domains have emulated TSC > > (XEN) TSC marked as reliable, warp =3D 0 (count=3D5) > > (XEN) No domains have emulated TSC > > (XEN) TSC marked as reliable, warp =3D 0 (count=3D6) > > (XEN) No domains have emulated TSC > > > > After add > > (XEN) TSC marked as reliable, warp =3D 1669912421214 (count=3D15) > > (XEN) No domains have emulated TSC > > (XEN) TSC marked as reliable, warp =3D 1669912421214 (count=3D16) > > (XEN) No domains have emulated TSC >=20 > If the warp is fixed, at least for HVM, this can be solved by adjusting > the TSC_OFFSET with the additional warp to make guest see warp=3D0 for > TSC invariant case. Anything missed? Hi Eddie -- Two things: 1) The TSC_OFFSET doesn't work for PV domains. 2) For HVM, it is very difficult to choose a precise TSC_OFFSET so that it passes a warp test. If it doesn't pass a warp test, upstream kernels will stop using tsc as a clocksource resulting in a big performance loss... and some applications that use TSC and are not TSC resilient that may have been working fine for weeks may suddenly break due to an event (adding a physical CPU to Xen) that neither the app nor its (guest) OS is able to detect. Dan