From: Sheng Yang <sheng@linux.intel.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
xen-devel@lists.xensource.com, Eddie Dong <eddie.dong@intel.com>,
frank.van.der.linden@oracle.com,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 0 of 5] PV on HVM Xen
Date: Tue, 16 Mar 2010 14:09:26 +0800 [thread overview]
Message-ID: <201003161409.26579.sheng@linux.intel.com> (raw)
In-Reply-To: <bb4d3eaa-dcf1-4812-a4d9-63c454c4105c@default>
On Tuesday 16 March 2010 08:32:22 Dan Magenheimer wrote:
> Sorry I've fallen hopelessly behind on this thread (rope? :-)
> so apologies if this has already been addressed:
>
> If the host and guest need to share the same tsc to work
> properly, and there are apps in the guest that assume a
> monotonically increasing TSC (or even "approximately monotonically
> increasing", e.g. can filter out reasonably small differences),
> and the VM migrates from a physical machine that's been running
> a long time to a recently booted physical machine, what
> happens to the app? (Answer: Prior to 4.0, or with tsc_mode==2
> in 4.0, the app fails.)
I haven't checked the live migration issue. But how does PV guest or kvmclock
deal with it? The same should works here. Even we may got some trouble in some
condition, we can still fall back to normal clocksource without any
loss(though we didn't want this thing always happen).
>
> TSC emulation addresses this issue (which is why it is effectively
> the default in Xen 4.0**) but has the side effect that the TSC reads
> required for the pvclock algorithm are trapped/emulated. In this
> case, pvclock may not be much faster than alternative
> clocksource implementations.
The hardware emulation is always not the best solution to address timer issue.
For example, now we have 3 kinds of different timer mode, and we have to let
user to determine which one is correct. And hope we won't need more timer mode
in the future. PV is always the best way to handle timer. Take a look at KVM,
they don't use much PV, but kvmclock is a must.
> > Sheng/Stefano, have you actually measured pvclock recently
> and compared it to other alternatives? I'm wondering how
> much of this discussion is moot.
If live migration is a issue now, we can address it. But hardware emulation is
even a issue for non-LM case - guest need to know the timer mode, which is
impossible to address. It's surely not the preferred method for VM if a PV way
is available(of course, and works well).
--
regards
Yang, Sheng
> Dan
>
> P.S. Note that TSC emulation in many cases behaves differently
> before and after migration, specifically on modern processors
> depending on the clock frequency of the source/destination
> machines, so please ensure post-migration is measured as this
> will be the common case in many virtualized data centers.
>
> ** see xen-unstable.hg/docs/misc/tscmode.txt
>
> > -----Original Message-----
> > From: Jeremy Fitzhardinge [mailto:jeremy@goop.org]
> > Sent: Monday, March 15, 2010 5:09 PM
> > To: Stefano Stabellini
> > Cc: xen-devel@lists.xensource.com; Sheng Yang
> > Subject: Re: [Xen-devel] [PATCH 0 of 5] PV on HVM Xen
> >
> > On 03/15/2010 05:28 AM, Stefano Stabellini wrote:
> > > I like your pv clocksource implementation.
> > > The only reason why I would defer the patch is that I don't
> >
> > particularly
> >
> > > like the "enable_pv" hypercall, so I would try to get away without
> >
> > it,
> >
> > > resetting the tsc offset automatically when enabling the VIRQ_TIMER
> >
> > on
> >
> > > an HVM domain.
> >
> > Ah, so the issue is that if we're using the pvclock, the host and guest
> > need to share the same tsc, so we can't deal with any kind of tsc
> > offset?
> >
> > In that case, I'd prefer to have an explicit "set/remove tsc offset"
> > vcpu op rather than making it the implicit side-effect of anything
> > else. In particular, since clock sources and event sources are
> > completely distinct, making tsc offset (a clock source thing) affected
> > VIRQ_TIMER (and event source thing) seems like a particularly poor
> > idea.
> >
> > That, or make the pvclock structure the HVM vcpu sees have timing
> > parameters which already incorporate the tsc offset. We've already
> > demonstrated that there's no need to have the time info in the real
> > shared memory between Xen and the domain (it can be updated via copy
> > when needed).
> >
> > J
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>
next prev parent reply other threads:[~2010-03-16 6:09 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 15:46 [PATCH 0 of 5] PV on HVM Xen Stefano Stabellini
2010-03-10 17:33 ` [Xen-devel] " Pasi Kärkkäinen
2010-03-10 17:55 ` Stefano Stabellini
2010-03-10 19:45 ` Jeremy Fitzhardinge
2010-03-12 3:23 ` Sheng Yang
2010-03-12 10:42 ` [Xen-devel] " Stefano Stabellini
2010-03-12 16:00 ` Stefano Stabellini
2010-03-15 4:05 ` Sheng Yang
2010-03-15 8:29 ` Sheng Yang
2010-03-15 12:22 ` Stefano Stabellini
2010-03-17 9:38 ` Sheng Yang
2010-03-17 14:18 ` Konrad Rzeszutek Wilk
2010-03-17 15:21 ` Stefano Stabellini
2010-03-17 16:13 ` Jeremy Fitzhardinge
2010-03-18 1:30 ` Sheng Yang
2010-03-19 20:38 ` Jeremy Fitzhardinge
2010-03-22 6:26 ` MSI proposal and work transfer...(was: Re: [PATCH 0 of 5] PV on HVM Xen) Sheng Yang
2010-03-23 20:47 ` Jeremy Fitzhardinge
2010-03-24 8:19 ` Sheng Yang
2010-03-23 23:16 ` Stefano Stabellini
2010-03-24 8:25 ` Sheng Yang
2010-03-18 2:19 ` [PATCH 0 of 5] PV on HVM Xen Sheng Yang
2010-03-18 16:42 ` Jeremy Fitzhardinge
2010-03-17 16:13 ` Jeremy Fitzhardinge
2010-03-15 12:28 ` Stefano Stabellini
2010-03-15 23:08 ` Jeremy Fitzhardinge
2010-03-15 23:24 ` Frank van der Linden
2010-03-16 0:32 ` Dan Magenheimer
2010-03-16 6:09 ` Sheng Yang [this message]
2010-03-16 16:46 ` Dan Magenheimer
2010-03-16 11:07 ` Stefano Stabellini
2010-03-16 17:23 ` Jeremy Fitzhardinge
2010-03-16 17:32 ` Stefano Stabellini
2010-03-16 17:41 ` Jeremy Fitzhardinge
2010-03-16 18:06 ` Stefano Stabellini
2010-03-16 18:26 ` Jeremy Fitzhardinge
2010-03-16 18:37 ` Stefano Stabellini
2010-03-17 8:51 ` Sheng Yang
2010-03-17 9:18 ` Sheng Yang
2010-03-17 15:17 ` Stefano Stabellini
2010-03-17 18:20 ` Ian Campbell
2010-03-18 1:42 ` Sheng Yang
2010-03-18 1:35 ` Sheng Yang
2010-03-18 14:22 ` Stefano Stabellini
2010-03-18 16:50 ` Jeremy Fitzhardinge
2010-03-18 17:30 ` Jeremy Fitzhardinge
2010-03-12 21:53 ` [Xen-devel] " Jeremy Fitzhardinge
-- strict thread matches above, loose matches on Subject: below --
2010-03-12 11:44 Boris Derzhavets
2010-03-12 11:59 ` Stefano Stabellini
2010-03-12 15:01 ` Boris Derzhavets
2010-03-12 15:08 ` Stefano Stabellini
2010-03-12 15:09 ` Boris Derzhavets
2010-03-12 20:10 ` Jeremy Fitzhardinge
2010-03-12 21:14 ` Boris Derzhavets
2010-03-12 21:22 ` Jeremy Fitzhardinge
2010-03-12 21:28 ` Boris Derzhavets
2010-03-12 21:25 ` Boris Derzhavets
2010-03-12 21:29 ` Jeremy Fitzhardinge
2010-03-12 22:08 ` Boris Derzhavets
2010-03-12 22:11 ` Jeremy Fitzhardinge
2010-03-12 22:13 ` Boris Derzhavets
2010-03-12 22:22 ` Jeremy Fitzhardinge
2010-03-15 15:53 ` Stefano Stabellini
2010-03-15 16:02 ` Boris Derzhavets
2010-03-15 17:27 ` Stefano Stabellini
2010-03-15 17:49 ` Boris Derzhavets
2010-03-15 18:01 ` Stefano Stabellini
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=201003161409.26579.sheng@linux.intel.com \
--to=sheng@linux.intel.com \
--cc=dan.magenheimer@oracle.com \
--cc=eddie.dong@intel.com \
--cc=frank.van.der.linden@oracle.com \
--cc=jeremy@goop.org \
--cc=stefano.stabellini@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).