From: "Dan Magenheimer" <dan.magenheimer@oracle.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>,
"Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>
Cc: Dave Winchell <dwinchell@virtualiron.com>
Subject: RE: Xen system skew MUCH worse than tsc skew (was RE: RE: [PATCH] record max stime skew (was RE: [PATCH] strictly increasing hvm guest time))
Date: Fri, 11 Jul 2008 14:53:39 -0600 [thread overview]
Message-ID: <20080711145339796.00000003744@djm-pc> (raw)
In-Reply-To: <C49CD805.1AD83%keir.fraser@eu.citrix.com>
> I didn't measure skew across CPUs. I measured jitter between
> one local TSC
> and the chosen platform timer for calibration (in my case I
> think this was
> the HPET). I did this because getting a consistent tick rate from the
> platform timer, and from each local TSC, is the basis for the
> calibration
> algorithm. The more jitter there is between them, the less
> well it will
> work.
>
> I implemented a user-space program to collect the required
> stats. It used
> CLI/STI to prevent getting interrupted when reading the timer pair.
Hmmm... if the TSC is known to be stable*, is there any reason to
do the calibration vs the platform timer? If TSC is stable,
could we instead just do essentially a divide by cpu_ghz in
get_s_time() and be done, no periodic local_time_calibration()
necessary? Since TSC is stable on many newer platforms, it
would be nice to use this feature to decrease skew for guests
(both PV and HV).
* stable is the term used by Linux to mean that there's no
skew between the different TSC's in an SMP system
I gave this a try and it seems to work so far. (Fortunately,
my CPU is 3GHz so I just had to divide by 3... I'm not sure
how to divide by a non-integer.) Max skew for stime is holding
steady at 270nsec, >40x better than periodic calibration w/hpet.
If this sounds good, a design question: Should this be
controlled:
1) by a boot option, or
2) by the TSC_CONSTANT cpu flag, or
3) when determined dynamically to be safe using code similar
to arch/x86/tsc_sync.c in recent Linux kernels
(1) is by far the easiest (perhaps not too late for 3.3?)
while (3) is clearly the best for users but adds lots of
code (bloat/untested)
Thanks,
Dan
next prev parent reply other threads:[~2008-07-11 20:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 16:03 [PATCH] strictly increasing hvm guest time Dan Magenheimer
2008-07-02 16:07 ` Keir Fraser
2008-07-02 21:50 ` Dan Magenheimer
2008-07-02 22:41 ` [PATCH] record max stime skew (was RE: [PATCH] strictly increasing hvm guest time) Dan Magenheimer
2008-07-03 8:03 ` Keir Fraser
2008-07-03 16:24 ` Dan Magenheimer
2008-07-03 16:35 ` Dan Magenheimer
2008-07-03 20:03 ` Dan Magenheimer
2008-07-03 23:00 ` Keir Fraser
2008-07-04 15:11 ` Dan Magenheimer
2008-07-04 15:22 ` Keir Fraser
2008-07-04 19:32 ` Dan Magenheimer
2008-07-04 19:56 ` Keir Fraser
2008-07-10 0:24 ` Dan Magenheimer
2008-07-10 7:40 ` Keir Fraser
2008-07-10 22:42 ` Xen system skew MUCH worse than tsc skew (was RE: RE: [PATCH] record max stime skew (was RE: [PATCH] strictly increasing hvm guest time)) Dan Magenheimer
2008-07-11 8:27 ` Keir Fraser
2008-07-11 20:53 ` Dan Magenheimer [this message]
2008-07-11 21:27 ` Xen system skew MUCH worse than tsc skew (was RE: RE: [PATCH] record max stime skew (was RE: [PATCH] strictly increasinghvm " Ian Pratt
2008-07-12 21:05 ` Dan Magenheimer
2008-07-11 21:27 ` Xen system skew MUCH worse than tsc skew (was RE: RE: [PATCH] record max stime skew (was RE: [PATCH] strictly increasing hvm " Keir Fraser
2008-07-12 21:07 ` Dan Magenheimer
2008-07-19 17:51 ` Dan Magenheimer
2008-07-21 8:32 ` Keir Fraser
2008-07-22 22:27 ` Dan Magenheimer
2008-07-22 23:07 ` Xen system skew MUCH worse than tsc skew (was RE: RE: [PATCH] record max stime skew (was RE: [PATCH] strictly increasinghvm " Ian Pratt
2008-07-23 0:40 ` Dan Magenheimer
2008-07-23 1:16 ` Ian Pratt
2008-07-23 6:11 ` Tian, Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080711145339796.00000003744@djm-pc \
--to=dan.magenheimer@oracle.com \
--cc=dwinchell@virtualiron.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.