All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>,
	John Levon <levon@movementarian.org>
Cc: Ian Pratt <Ian.Pratt@eu.citrix.com>,
	xen-devel@lists.xensource.com,
	Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: RE: [PATCH] TSC scaling for live migration between platforms with different TSC frequecies
Date: Fri, 19 Jun 2009 13:44:22 -0700 (PDT)	[thread overview]
Message-ID: <fa59ff69-c5c1-4ce7-b495-f358cfdfd5c8@default> (raw)
In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC201BD7DBFA2@pdsmsx503.ccr.corp.intel.com>

> > On HVM or VMWare we don't even try, since we can't possibly know the
> > real CPUs skew: the assumption is the VM platform has already done
> > this for us. And at least Xen attempts to sync up the physical CPUs.
> > Significant drift (where different CPUs are ticking at different
> > rates) is bad news, and can easily lead to non-monotonicity. I don't
> > know what "significant" means though, unfortunately.
> 
> We can guanrantee each vcpu's TSC is increasing 
> monotonically, but there maybe some diff between vcpus.  I am 
> not sure 10^5 cycles is significant, but it should exceed a 
> stable hardware's drift in general. 

Let me attempt to define "significant":

Assume that two kernel- or user-threads are able to synchronize
such that they can guarantee execution order.  If:

1) thread A reads TSC, and then
2) thread A and thread B sync to guarantee ordering, and then
3) thread B reads TSC, but
4) thread B's TSC value is less than thread A's TSC value

then the TSC skew is "significant".

If thread A and thread B are for example using TSC values
to timestamp journal transactions, then transaction guarantees
will not be valid.

So the question becomes: What is the smallest number of
cycles that are required to allow thread A and thread B
to synchronize for ordering?

I assert that this value is low enough _in theory_ that
only full TSC emulation can guarantee the proper result.
In _practice_, I don't know.  But I suspect that
it is much lower than 10^5 cycles.

Dan

  reply	other threads:[~2009-06-19 20:44 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  2:56 [PATCH] TSC scaling for live migration between platforms with different TSC frequecies Zhang, Xiantao
2009-06-18  7:37 ` [PATCH] TSC scaling for live migration betweenplatforms " Jan Beulich
2009-06-18  8:52   ` Zhang, Xiantao
2009-06-18 15:40     ` Dan Magenheimer
2009-06-19  1:48       ` Zhang, Xiantao
2009-06-18  9:02 ` [PATCH] TSC scaling for live migration between platforms " Tim Deegan
2009-06-18  9:46   ` Zhang, Xiantao
2009-06-18  9:56     ` Tim Deegan
2009-06-18  9:10 ` Patrick Colp
2009-06-18  9:27   ` Tim Deegan
2009-06-18  9:47     ` Zhang, Xiantao
2009-06-18 15:45       ` Dan Magenheimer
2009-06-18 16:04         ` Tim Deegan
2009-06-18 20:07           ` Dan Magenheimer
2009-06-18 10:56 ` Ian Pratt
2009-06-18 15:58   ` Dan Magenheimer
2009-06-18 16:45     ` John Levon
2009-06-18 20:27       ` Dan Magenheimer
2009-06-18 20:45         ` John Levon
2009-06-18 20:57           ` Dan Magenheimer
2009-06-18 21:00             ` John Levon
2009-06-18 22:27               ` Dan Magenheimer
2009-06-19 13:36                 ` John Levon
2009-06-19  1:21               ` Zhang, Xiantao
2009-06-19 13:54                 ` John Levon
2009-06-18 23:49       ` Dong, Eddie
2009-06-19  2:25       ` Zhang, Xiantao
2009-06-19 13:53         ` John Levon
2009-06-19 15:07           ` Zhang, Xiantao
2009-06-19 20:44             ` Dan Magenheimer [this message]
2009-06-22  1:38               ` Zhang, Xiantao
2009-06-19  1:34   ` Zhang, Xiantao
2009-06-22  5:14 ` Zhang, Xiantao
2009-06-23 10:18   ` Keir Fraser
2009-06-24  1:18     ` Zhang, Xiantao

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=fa59ff69-c5c1-4ce7-b495-f358cfdfd5c8@default \
    --to=dan.magenheimer@oracle.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=levon@movementarian.org \
    --cc=xen-devel@lists.xensource.com \
    --cc=xiantao.zhang@intel.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.