Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm guest prefers timer_mode==1.> -----Original Message----- > From: Xen patchbot-unstable > [mailto:patchbot-unstable@lists.xensource.com] > Sent: Tuesday, September 30, 2008 9:00 AM > To: xen-changelog@lists.xensource.com > Subject: [Xen-changelog] [xen-unstable] hvm: Default timer_mode=1 (do > not delay virtual time for missed > > > # HG changeset patch > # User Keir Fraser <keir.fraser@citrix.com> > # Date 1222445376 -3600 > # Node ID 1420a6649cfa2963f1d71956756c922a3b671ae6 > # Parent 840c0c3c185ae2b0baeceba7caf2f420a44f116d > hvm: Default timer_mode=1 (do not delay virtual time for missed > ticks). Most guests prefer this mode compared with screwing with > progress of virtual time. > > Signed-off-by: Keir Fraser <keir.fraser@citrix.com> > --- > tools/python/xen/xend/XendConfig.py | 2 +- > tools/python/xen/xm/create.py | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff -r 840c0c3c185a -r 1420a6649cfa > tools/python/xen/xend/XendConfig.py > --- a/tools/python/xen/xend/XendConfig.py Fri Sep 26 > 15:33:51 2008 +0100 > +++ b/tools/python/xen/xend/XendConfig.py Fri Sep 26 > 17:09:36 2008 +0100 > @@ -441,7 +441,7 @@ class XendConfig(dict): > > if self.is_hvm(): > if ''timer_mode'' not in self[''platform'']: > - self[''platform''][''timer_mode''] = 0 > + self[''platform''][''timer_mode''] = 1 > if ''rtc_timeoffset'' not in self[''platform'']: > self[''platform''][''rtc_timeoffset''] = 0 > if ''hpet'' not in self[''platform'']: > diff -r 840c0c3c185a -r 1420a6649cfa tools/python/xen/xm/create.py > --- a/tools/python/xen/xm/create.py Fri Sep 26 15:33:51 2008 +0100 > +++ b/tools/python/xen/xm/create.py Fri Sep 26 17:09:36 2008 +0100 > @@ -214,7 +214,7 @@ gopts.var(''hpet'', val=''HPET'', > use="Enable virtual high-precision event timer.") > > gopts.var(''timer_mode'', val=''TIMER_MODE'', > - fn=set_int, default=0, > + fn=set_int, default=1, > use="""Timer mode (0=delay virtual time when ticks > are missed; > 1=virtual time is always wallclock time.""") > > > _______________________________________________ > Xen-changelog mailing list > Xen-changelog@lists.xensource.com > http://lists.xensource.com/xen-changelog >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Actually I thought we''d agreed to change the timer_mode default to 1. Is there a better value? Zero seems a poor default to return to. -- Keir On 30/9/08 21:25, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:> Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm > guest prefers timer_mode==1. > >> -----Original Message----- >> From: Xen patchbot-unstable >> [mailto:patchbot-unstable@lists.xensource.com] >> Sent: Tuesday, September 30, 2008 9:00 AM >> To: xen-changelog@lists.xensource.com >> Subject: [Xen-changelog] [xen-unstable] hvm: Default timer_mode=1 (do >> not delay virtual time for missed >> >> >> # HG changeset patch >> # User Keir Fraser <keir.fraser@citrix.com> >> # Date 1222445376 -3600 >> # Node ID 1420a6649cfa2963f1d71956756c922a3b671ae6 >> # Parent 840c0c3c185ae2b0baeceba7caf2f420a44f116d >> hvm: Default timer_mode=1 (do not delay virtual time for missed >> ticks). Most guests prefer this mode compared with screwing with >> progress of virtual time. >> >> Signed-off-by: Keir Fraser <keir.fraser@citrix.com> >> --- >> tools/python/xen/xend/XendConfig.py | 2 +- >> tools/python/xen/xm/create.py | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff -r 840c0c3c185a -r 1420a6649cfa >> tools/python/xen/xend/XendConfig.py >> --- a/tools/python/xen/xend/XendConfig.py Fri Sep 26 >> 15:33:51 2008 +0100 >> +++ b/tools/python/xen/xend/XendConfig.py Fri Sep 26 >> 17:09:36 2008 +0100 >> @@ -441,7 +441,7 @@ class XendConfig(dict): >> >> if self.is_hvm(): >> if ''timer_mode'' not in self[''platform'']: >> - self[''platform''][''timer_mode''] = 0 >> + self[''platform''][''timer_mode''] = 1 >> if ''rtc_timeoffset'' not in self[''platform'']: >> self[''platform''][''rtc_timeoffset''] = 0 >> if ''hpet'' not in self[''platform'']: >> diff -r 840c0c3c185a -r 1420a6649cfa tools/python/xen/xm/create.py >> --- a/tools/python/xen/xm/create.py Fri Sep 26 15:33:51 2008 +0100 >> +++ b/tools/python/xen/xm/create.py Fri Sep 26 17:09:36 2008 +0100 >> @@ -214,7 +214,7 @@ gopts.var(''hpet'', val=''HPET'', >> use="Enable virtual high-precision event timer.") >> >> gopts.var(''timer_mode'', val=''TIMER_MODE'', >> - fn=set_int, default=0, >> + fn=set_int, default=1, >> use="""Timer mode (0=delay virtual time when ticks >> are missed; >> 1=virtual time is always wallclock time.""") >> >> >> _______________________________________________ >> Xen-changelog mailing list >> Xen-changelog@lists.xensource.com >> http://lists.xensource.com/xen-changelog >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, Sep 30, 2008 at 08:25:31PM +0000, Dan Magenheimer wrote:> Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm > guest prefers timer_mode==1.Solaris does :) regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> From: John Levon [mailto:levon@movementarian.org] > Subject: Re: [Xen-devel] timer_mode default change?!? > > > Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm > > guest prefers timer_mode==1. > > Solaris does :)Hi John -- Perhaps you can explain what timer_mode==1 does then? (E.g. how it differs from timer_mode==0 and timer_mode==2) I''ve never quite understood it and an attempt to document timer_mode that I posted several months ago left timer_mode==1 rather vague. http://lists.xensource.com/archives/html/xen-devel/2008-01/msg01223.html Other than being nice for Solaris (and Windows?), could you defend a default of timer_mode==1? Thanks, Dan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Thu, Oct 09, 2008 at 10:50:05PM +0000, Dan Magenheimer wrote:> > > Huh? > > > guest prefers timer_mode==1. > > > > Solaris does :) > > Perhaps you can explain what timer_mode==1 does then? > how it differs from timer_mode==0 and timer_mode==2) > never quite understood it and an attempt to document timer_mode > that I posted several months ago left timer_mode==1 rather > vague.Here''s a copy of an explanation found etched on a mysterious rock in the Sinai desert (that is, I was forwarded it): """ Timer_mode 0/1 track exact number of timer interrupt which need be injected to guest. If timer interrupts cannot be injected on time, pending_count++. The difference is that for mode 0, guest TSC is also hold back if there are timer interrupts pending, while for mode 1 guest TSC always equals to (host TSC - constant offset) Time mode 2/3 don''t inject each pending time interrupt to guest, hoping guest OS itself can handle time interrupt lost and adjust time using platform timer (e.g. HPET)''s counter. """ Empirically, timer mode of 0 makes Solaris SMP almost unusable. Timer mode 0 makes it run OK. I''ve never been quite able to get my head around exactly why it makes such a big difference. We use the TSC as the basis of our hres timer by default, and there is code that implements microsecond waits by busy-waiting for this value to reach a certain point. My suspicion is that with timer_mode=0, we spend all of time busy-waiting since the TSC doesn''t jump forward to the host''s TSC, but that doesn''t really explain why SMP is bad and UP is OK. regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
John Levon writes ("Re: [Xen-devel] timer_mode default change?!?"):> Empirically, timer mode of 0 makes Solaris SMP almost unusable. Timer > mode 0 makes it run OK.I assume that one of those should not have been zero ... Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Fri, Oct 10, 2008 at 02:14:26PM +0100, Ian Jackson wrote:> John Levon writes ("Re: [Xen-devel] timer_mode default change?!?"): > > Empirically, timer mode of 0 makes Solaris SMP almost unusable. Timer > > mode 0 makes it run OK. > > I assume that one of those should not have been zero ...Yes, the latter should be 1 regards john _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel