All of lore.kernel.org
 help / color / mirror / Atom feed
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: RE: [PATCH] record max stime skew (was RE: [PATCH] strictly increasing  hvm guest time)
Date: Fri, 4 Jul 2008 09:11:55 -0600	[thread overview]
Message-ID: <20080704091155093.00000003744@djm-pc> (raw)
In-Reply-To: <C493188C.1A82A%keir.fraser@eu.citrix.com>

> Skipping cpu0 makes no sense.

Oops, I misunderstood that for some reason.

Here's a fixed version.  I also now preserve the "Platform timer is"
line since that can get flushed out of the dmesg buffer.

Any idea why the skew can get so bad?

Dan

> -----Original Message-----
> From: Keir Fraser [mailto:keir.fraser@eu.citrix.com]
> Sent: Thursday, July 03, 2008 5:00 PM
> To: dan.magenheimer@oracle.com; Xen-Devel (E-mail)
> Cc: Dave Winchell
> Subject: Re: [Xen-devel] RE: [PATCH] record max stime skew (was RE:
> [PATCH] strictly increasing hvm guest time)
> 
> 
> Skipping cpu0 makes no sense. It's not the 'master'. 
> master_stime is time
> calculated from the platform timer (hpet, pit, or whatever). 
> All cpus are
> equal peers. Apart from that looks plausible to me.
> 
>   -- Keir
> 
> On 3/7/08 21:03, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:
> 
> >>> IMHO, it would be nice to put this patch into the tree as it
> >>> will be good for helping to diagnose time skew problems
> >>> such as the one just reported on the list.
> >>
> >> Oops!  Just after I sent the above email, I checked again and
> >> the same machine (no reboots, no guests ever launched) now reports
> >> a max stime skew of 4333ns!!  Methinks there might be some
> >> periodic glitch in the calibration code?
> >
> > OK this version records not only max but also a distribution
> > of skew.  (The code is a bit ugly... I thought about doing
> > something fancy with log-binary but decided a few base-10
> > ranges were clearer for a human to read.)
> >
> > With this, I use "watch -d 'xm debug-key t; xm dmesg | tail -3'"
> > and can observe that (on my single-socket two-core recent-vintage
> > Intel box) roughly three-quarters of the skew measurements are
> > between 10-100nsec, roughly one-quarter are between 100ns-1us,
> > a couple percent are between 1us-10us and a few are >10us.
> >
> > This represents an approximate distribution of how long an hvm
> > guest might observe time to be stopped (if it is able to repeatedly
> > read time values quickly enough).
> >
> > So on some machines, this might be substantially worse than the
> > old hvm-platform-timer-built-on-tsc mechanism (though we had
> > no monotonicity constraint built into that).
> >
> > I wonder if the >1us outliers are occurring only if the
> > processor has been idle for awhile, vs entirely random.
> >
> > Dan
> 
> 
>

  reply	other threads:[~2008-07-04 15:11 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 [this message]
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
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=20080704091155093.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.