timer_mode default change?!?
Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm guest prefers timer_mode==1.
Quoted 58 lines
-----Original Message-----
From: Xen patchbot-unstable [mailto:[email protected]]
Sent: Tuesday, September 30, 2008 9:00 AM
To: [email protected]
Subject: [Xen-changelog] [xen-unstable] hvm: Default timer_mode=1 (do not delay virtual time for missed# HG changeset patch
# User Keir Fraser <[email protected]>
# Date 1222445376 -3600
# Node ID1420a6649cfa2963f1d71956756c922a3b671ae6
# Parent840c0c3c185ae2b0baeceba7caf2f420a44f116d
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 <[email protected]>--- tools/python/xen/xend/XendConfig.py | 2 +- tools/python/xen/xm/create.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)diff -r
840c0c3c185a-r1420a6649cfatools/python/xen/xend/XendConfig.py
---a/tools/python/xen/xend/XendConfig.pyFri Sep 26
15:33:51 2008 +0100
+++b/tools/python/xen/xend/XendConfig.pyFri Sep 26
17:09:36 2008 +0100(quoted diff) +1
-1@@ -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-r1420a6649cfatools/python/xen/xm/create.pytools/python/xen/xm/create.py +1
-1@@ -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
[email protected]
http://lists.xensource.com/xen-changelog
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
Quoted 61 lines · Dan Magenheimer
Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm guest prefers timer_mode==1.
Quoted 58 lines
-----Original Message-----
From: Xen patchbot-unstable [mailto:[email protected]]
Sent: Tuesday, September 30, 2008 9:00 AM
To: [email protected]
Subject: [Xen-changelog] [xen-unstable] hvm: Default timer_mode=1 (do not delay virtual time for missed# HG changeset patch
# User Keir Fraser <[email protected]>
# Date 1222445376 -3600
# Node ID1420a6649cfa2963f1d71956756c922a3b671ae6
# Parent840c0c3c185ae2b0baeceba7caf2f420a44f116d
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 <[email protected]>--- tools/python/xen/xend/XendConfig.py | 2 +- tools/python/xen/xm/create.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)diff -r
840c0c3c185a-r1420a6649cfatools/python/xen/xend/XendConfig.py
---a/tools/python/xen/xend/XendConfig.pyFri Sep 26 15:33:51 2008 +0100
+++b/tools/python/xen/xend/XendConfig.pyFri Sep 26 17:09:36 2008 +0100(quoted diff) +1
-1@@ -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-r1420a6649cfatools/python/xen/xm/create.pytools/python/xen/xm/create.py Fri Sep 26 17:09:36 2008 +0100 renamed from tools/python/xen/xm/create.py Fri Sep 26 15:33:51 2008 +0100 +1
-1@@ -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
[email protected]
http://lists.xensource.com/xen-changelog
Quoted 2 lines · Dan Magenheimer
Huh? "Most guests" means Windows? AFAIK, *no* Linux hvm guest prefers timer_mode==1.
Solaris does :)
regards
john
Quoted 7 lines
From: John Levon [mailto:[email protected]]
Subject: Re: [Xen-devel]timer_modedefault change?!?Quoted 2 lines
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
Quoted 10 lines · Dan Magenheimer
Quoted 4 lines
Quoted 2 lines
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_modethat 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
John Levon writes ("Re: [Xen-devel] timer_mode default change?!?"):
Quoted 2 lines
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.
Quoted 5 lines · Ian Jackson
John Levon writes ("Re: [Xen-devel]
timer_modedefault change?!?"):Quoted 2 lines
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