qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, Anthony Liguori <anthony@codemonkey.ws>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>,
	Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] Rethinking missed tick catchup
Date: Wed, 19 Sep 2012 19:55:01 +0300	[thread overview]
Message-ID: <20120919165501.GC26958@redhat.com> (raw)
In-Reply-To: <5059F66B.3010704@redhat.com>

On Wed, Sep 19, 2012 at 07:44:27PM +0300, Avi Kivity wrote:
> On 09/19/2012 07:37 PM, Gleb Natapov wrote:
> > On Wed, Sep 19, 2012 at 06:34:46PM +0300, Avi Kivity wrote:
> >> On 09/16/2012 05:37 PM, Anthony Liguori wrote:
> >> > Avi Kivity <avi@redhat.com> writes:
> >> > 
> >> >> On 09/13/2012 09:27 PM, Anthony Liguori wrote:
> >> >>> If there was a better/equivalent solution that didn't depend on qemu-ga,
> >> >>> I'd be all for it.  But there isn't AFAICT.
> >> >>
> >> >> Perhaps there is.  We fixed the problem for Linux by adding kvmclock and
> >> >> backporting it to distros that users are most likely to use.  Windows
> >> >> fixed the problem by adding their own pv clock interface.  So we need to
> >> >> implement that, then focus on tick catchup for Windows XP and other
> >> >> guests with no pv interface (*BSD, etc.)
> >> > 
> >> > Tick catchup simply isn't going to work.  That's the whole point of the thread.
> >> 
> >> I'll restate.  Windows and Linux don't need either qemu-ga or tick
> >> catchup since they have pv time interfaces.  FreeBSD and less frequently
> >> used guests are unlikely to get a qemu-ga port, so they need tick
> >> catchup.  Is there reason to believe tick catchup won't work on FreeBSD?
> >> 
> > If FreeBSD tries to compensate for lost ticks it may not work.
> 
> Right, the problem is with guests that are too clever for their own
> good.  No idea where FreeBSD (or the others, just using it as a
> placeholder) fall.  But my guess is that the less popular the guest, the
> fewer dirty tricks it pulls.
> 
> > 
> >> >>
> >> >> Those older guests are also less likely to have a qemu-ga port or
> >> >> administrator motivation to install it.
> >> > 
> >> > That's a strange assertion to make.  FWIW, the issue with hibernation
> >> > was reported to me with a combination of WinXP and Windows 7 guests, in
> >> > this case, it's a totally new deployment.  Adding qemu-ga is totally
> >> > reasonable.
> >> 
> >> Windows 7 doesn't need anything if we implement the pv time interface.
> > What PV interface exactly? According to [1] Hyper-v also tries to
> > "catch-up" timer by shortening timer period unless to many events were
> > missed.
> > 
> > [1] http://msdn.microsoft.com/en-us/library/windows/hardware/ff542561%28v=vs.85%29.aspx
> > 
> 
> Reference Time Counter.  If Windows uses that in preference to the tick,
> then tick catch up is immaterial.
> 
Windows uses it for QPC if iTSC (kvmclock) is not available. I am not at
all sure Windows uses Reference Time Counter for time keeping.

> 
> >> That is less effort than requiring a qemu-ga installation.  Windows XP
> >> is an edge case.  We can of course support qemu-ga for it, or we can
> >> massage the tick code to work with it, since it's timekeeping is likely
> >> a lot less sophisticated than 7's.
> >> 
> > How do you propose to "massage the tick code" to compensate for 100
> > hours of missed ticks in a sane way? 
> 
> Probably not solvable.  But I'm less concerned about host suspend and
> more about overcommit, which is more likely to cause missed ticks in
> practice.
> 
> > As far as I know there is no
> > difference in timekeeping between Windows XP and Windows 7 (at least
> > without PV).
> 
> Including the rtc resync?
> 
You mean resync time with RTC from time to time. I think so. In practice
I didn't hear any complains about it for any Windows. We can solve
resync problem easily though by reporting time as "current time" - "time we
going to reinject"

--
			Gleb.

  reply	other threads:[~2012-09-19 16:55 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 13:54 [Qemu-devel] Rethinking missed tick catchup Anthony Liguori
2012-09-12 14:21 ` Jan Kiszka
2012-09-12 14:44   ` Anthony Liguori
2012-09-12 14:50     ` Jan Kiszka
2012-09-12 15:06     ` Gleb Natapov
2012-09-12 15:42       ` Jan Kiszka
2012-09-12 15:45         ` Gleb Natapov
2012-09-12 16:16       ` Gleb Natapov
2012-09-12 15:15 ` Gleb Natapov
2012-09-12 18:19   ` Anthony Liguori
2012-09-13 10:49     ` Gleb Natapov
2012-09-13 13:14       ` Eric Blake
2012-09-13 13:28         ` Daniel P. Berrange
2012-09-13 14:06           ` Anthony Liguori
2012-09-13 14:22             ` Gleb Natapov
2012-09-13 14:34               ` Avi Kivity
2012-09-13 14:42                 ` Eric Blake
2012-09-13 15:40                   ` Avi Kivity
2012-09-13 15:50                     ` Anthony Liguori
2012-09-13 15:53                       ` Avi Kivity
2012-09-13 18:27                         ` Anthony Liguori
2012-09-16 10:05                           ` Avi Kivity
2012-09-16 14:37                             ` Anthony Liguori
2012-09-19 15:34                               ` Avi Kivity
2012-09-19 16:37                                 ` Gleb Natapov
2012-09-19 16:44                                   ` Avi Kivity
2012-09-19 16:55                                     ` Gleb Natapov [this message]
2012-09-19 16:57                                       ` Avi Kivity
2012-09-13 14:35               ` Anthony Liguori
2012-09-13 14:48                 ` Gleb Natapov
2012-09-13 15:51                   ` Avi Kivity
2012-09-13 15:56                   ` Anthony Liguori
2012-09-13 16:06                     ` Gleb Natapov
2012-09-13 18:33                       ` Anthony Liguori
2012-09-13 18:56                         ` Gleb Natapov
2012-09-13 20:06                           ` Anthony Liguori
2012-09-13 16:08                     ` Avi Kivity
2012-09-13 13:47         ` Gleb Natapov
2012-09-12 16:27 ` Stefan Weil
2012-09-12 16:45   ` Gleb Natapov
2012-09-12 17:30     ` Stefan Weil
2012-09-12 18:13       ` Gleb Natapov
2012-09-12 19:45         ` Stefan Weil
2012-09-13 10:50           ` Gleb Natapov
2012-09-12 20:06       ` Michael Roth
2012-09-12 17:23 ` Luiz Capitulino
  -- strict thread matches above, loose matches on Subject: below --
2012-09-12 18:03 Clemens Kolbitsch
2012-09-13  6:25 ` Paolo Bonzini

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=20120919165501.GC26958@redhat.com \
    --to=gleb@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).