From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Radim Krcmar <rkrcmar@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration
Date: Mon, 28 Nov 2016 18:30:06 +0100 [thread overview]
Message-ID: <e2b9b191-ff7f-df1d-95fd-1c1ec6ea6481@redhat.com> (raw)
In-Reply-To: <20161128163648.GA4028@amt.cnet>
On 28/11/2016 17:36, Marcelo Tosatti wrote:
> If the source masterclock is disabled, then the guest does
> not enable the optimization to not use a global variable
> to guarantee monotonicity. Therefore there will be no
> time backwards events (the timer backwards events crashed
> guests, and are the reason for reading from guest memory).
>
> So if there are no flaws in the reasoning above,
> no, there is no need to read from memory if
> masterclock is disabled.
Yeah, the reasoning is sound. So you go from what Eduardo and I were
thinking:
if last KVM_GET_CLOCK was not reliable then
read from memory
to this:
if last KVM_GET_CLOCK was not reliable && masterclock is enabled
read from memory
but:
- on an old kernel, the left side is always true and the right side is
unknown (so we must assume it's true and read from memory)
- on a new kernel, the two sides of the "&&" are exactly the opposite,
so the result is always false
and then it becomes
if old kernel then
read from memory
Got it finally. :)
Paolo
> Can you state the reasons why you think it should be enabled?
>
next prev parent reply other threads:[~2016-11-28 17:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 12:36 [qemu patch 0/2] improve kvmclock difference on migration Marcelo Tosatti
2016-11-14 12:36 ` [qemu patch 1/2] kvm: sync linux headers Marcelo Tosatti
2016-11-14 12:36 ` [qemu patch 2/2] kvmclock: reduce kvmclock difference on migration Marcelo Tosatti
2016-11-14 13:54 ` Paolo Bonzini
2016-11-14 14:00 ` Marcelo Tosatti
2016-11-14 14:22 ` Paolo Bonzini
2016-11-14 14:50 ` Marcelo Tosatti
2016-11-14 15:00 ` Paolo Bonzini
2016-11-14 15:40 ` Marcelo Tosatti
2016-11-14 16:43 ` Paolo Bonzini
2016-11-14 17:13 ` Marcelo Tosatti
2016-11-14 17:20 ` Paolo Bonzini
2016-11-14 18:15 ` Marcelo Tosatti
2016-11-17 12:16 ` Marcelo Tosatti
2016-11-17 13:03 ` Paolo Bonzini
2016-11-28 13:47 ` Paolo Bonzini
2016-11-28 14:28 ` Eduardo Habkost
2016-11-28 15:12 ` Paolo Bonzini
2016-11-28 16:36 ` Marcelo Tosatti
2016-11-28 17:30 ` Paolo Bonzini [this message]
2016-11-14 14:11 ` Juan Quintela
2016-11-14 14:09 ` Juan Quintela
2016-11-14 15:37 ` Marcelo Tosatti
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=e2b9b191-ff7f-df1d-95fd-1c1ec6ea6481@redhat.com \
--to=pbonzini@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=rkrcmar@redhat.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).