From: Dan Magenheimer Subject: RE: [PATCH] replace rdtsc emulation-vs-native xen boot option with per-domain (hypervisor part) Date: Mon, 28 Sep 2009 08:13:08 -0700 (PDT) Message-ID: <173242aa-c95c-4b7f-a095-888763851b0f@default> References: <706158FABBBA044BAD4FE898A02E4BC201C9A181BC@pdsmsx503.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC201C9A181BC@pdsmsx503.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: "Zhang, Xiantao" , Keir Fraser , "Xen-Devel (E-mail)" List-Id: xen-devel@lists.xenproject.org > if administrator doesn't=20 > like to suffer performance loss in emulation way, he can=20 > migrate the guest back OK, that makes sense. > system administrator can get the tsc emulation=20 > knowledge from Xen's system log Getting information from the log is probably not a good longterm solution though. I think there needs to be a management/tools mechanism to query if a migrated/restored domain has transitioned from tsc-native to tsc-emulated or vice versa. Thanks, Dan > -----Original Message----- > From: Zhang, Xiantao [mailto:xiantao.zhang@intel.com] > Sent: Monday, September 28, 2009 2:23 AM > To: Dan Magenheimer; Keir Fraser; Xen-Devel (E-mail) > Subject: RE: [Xen-devel] [PATCH] replace rdtsc emulation-vs-native xen > boot option with per-domain (hypervisor part) >=20 >=20 > Dan Magenheimer wrote: > > Sorry I should have explained my logic for those changes > > in the original posting. > >=20 > > The scaling is a strange corner case where a domain > > can invisibly change from native-tsc to virtual-tsc. > > I started to add a domctl so that the current state > > could be probed, but decided that the scaling is > > really a policy decision that is best made at > > config time and best retained in the VM information > > carried along with a save file (or live migration). > > Allowing rdtsc to change dynamically according to > > whether a save/restore/migration happened to occur > > and whether the restored VM happened to land on > > a machine with a different clock rate seems like > > it could get very confusing. The domain adminstrator > > either assumes correctness (the default) or turns > > off emulation to get better performance and deals > > with ALL the consequences. So IMHO removing the > > scaling simplifies an already complex-to-explain > > issue.=20 > Hi, Dan > I didn't see the necessity to remove the scaling logic. =20 > This logic just allows the domain can run in different=20 > TSC-freq platforms without strange timing behaviors. If the=20 > domain is migrated between tow machines with different TSC=20 > rate, system administrator can get the tsc emulation=20 > knowledge from Xen's system log, and if administrator doesn't=20 > like to suffer performance loss in emulation way, he can=20 > migrate the guest back. Besides, I don't think this logic=20 > conflicts with your boot-stage option.IMO, if the boot-stage=20 > option is set to use emulation, the scaling policy can be=20 > switched off, but if the option is not specified, I think the=20 > default scaling policy should be adopted in migration case. =20 > Xiantao >=20 > >=20 > >> -----Original Message----- > >> From: Keir Fraser [mailto:keir.fraser@eu.citrix.com] > >> Sent: Sunday, September 27, 2009 3:39 PM > >> To: Dan Magenheimer; Xen-Devel (E-mail) > >> Subject: Re: [Xen-devel] [PATCH] replace rdtsc emulation-vs-native > >> xen boot option with per-domain (hypervisor part) > >>=20 > >>=20 > >> On 27/09/2009 20:22, "Dan Magenheimer" > >> wrote: > >>=20 > >>> (I'm still struggling against the coils of python on > >>> the tools part of this patch, so thought I'd post the > >>> hypervisor side separately first.) > >>>=20 > >>> Switches rdtsc emulation from boot option to per-domain > >>> and enables it by default. Also removes hvm tsc scaling > >>> as it is no longer necessary. > >>=20 > >> The hvm tsc scaling will still be useful in the case that > >> trap-&-emulate was originally disabled for an hvm domain. So I'd > >> keep it, and=20 > >> also keep the > >> flag called d->arch.vtsc rather than flipping it and renaming > >> it, and the > >> patch will end up about 20 lines long. > >>=20 > >> I'll rework this patch myself and check it in at the same > >> time as the tools > >> patch, when you have that ready. > >>=20 > >> -- Keir > >>=20 > >>=20 > >>=20 > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > >> http://lists.xensource.com/xen-devel > >>=20 > >=20 > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel >=20 >