From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Glauber Costa <glommer@gmail.com>
Subject: Re: KVM: x86: fix tsc catchup issue with tsc scaling
Date: Wed, 15 Jan 2014 14:55:04 -0200 [thread overview]
Message-ID: <20140115165504.GA8301@amt.cnet> (raw)
In-Reply-To: <52D6BD02.5050807@redhat.com>
On Wed, Jan 15, 2014 at 05:53:22PM +0100, Paolo Bonzini wrote:
> Il 15/01/2014 17:37, Marcelo Tosatti ha scritto:
> > > Right. Another question, what about this comment:
> > >
> > > /* Reset of TSC must disable overshoot protection below */
> > > vcpu->arch.hv_clock.tsc_timestamp = 0;
> > > vcpu->arch.last_guest_tsc = data;
> > >
> > > Should it be instead like this:
> > >
> > > vcpu->arch.hv_clock.tsc_timestamp += data - vcpu->arch.last_guest_tsc;
> > > vcpu->arch.last_guest_tsc = data;
> > >
> > > ?
> >
> > Don't see why it should?
>
> Setting tsc_timestamp to 0 makes no sense with the current code, I'm
> trying to understand if the right fix is to delete that line or
> something else. What I proposed (plus a version increase) would make a
> pvclock read continuous before and after the change.
>
> But looking more at the surrounding code, the calls to kvm_write_tsc
> ultimately result in a master clock update as soon as all TSCs agree and
> the master clock is re-enabled. This master clock update rewrites
> tsc_timestamp. Then I think that the line that sets tsc_timestamp to 0
> can be deleted.
ACK.
prev parent reply other threads:[~2014-01-15 16:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 14:18 KVM: x86: fix tsc catchup issue with tsc scaling Marcelo Tosatti
2014-01-15 11:43 ` Paolo Bonzini
2014-01-15 12:25 ` Marcelo Tosatti
2014-01-15 12:34 ` Marcelo Tosatti
2014-01-15 12:55 ` Paolo Bonzini
2014-01-15 16:37 ` Marcelo Tosatti
2014-01-15 16:53 ` Paolo Bonzini
2014-01-15 16:55 ` Marcelo Tosatti [this message]
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=20140115165504.GA8301@amt.cnet \
--to=mtosatti@redhat.com \
--cc=glommer@gmail.com \
--cc=jeremy@goop.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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 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.