From: Marcelo Tosatti <mtosatti@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
Dr David Alan Gilbert <dgilbert@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Radim Krcmar <rkrcmar@redhat.com>
Subject: Re: [qemu patch V4 2/2] kvmclock: reduce kvmclock difference on migration
Date: Mon, 12 Dec 2016 17:44:52 -0200 [thread overview]
Message-ID: <20161212194451.GA20241@amt.cnet> (raw)
In-Reply-To: <20161212180105.GF3808@thinpad.lan.raisama.net>
On Mon, Dec 12, 2016 at 04:01:05PM -0200, Eduardo Habkost wrote:
> On Sat, Dec 10, 2016 at 03:21:50PM -0200, Marcelo Tosatti wrote:
> [...]
> > static void kvmclock_realize(DeviceState *dev, Error **errp)
> > {
> > KVMClockState *s = KVM_CLOCK(dev);
> >
> > + if (kvm_has_adjust_clock_stable()) {
> > + s->clock_is_reliable = true;
> > + }
> > +
>
> This seems unnecessary, as kvmclock_vm_state_change() makes sure
> it is set at the same time as s->clock. Should we just remove it?
There is this initialization that goes from ~running -> running
which assumes its initialized:
static void kvmclock_vm_state_change(void *opaque, int running,
RunState state)
{
KVMClockState *s = opaque;
CPUState *cpu;
int cap_clock_ctrl = kvm_check_extension(kvm_state,
KVM_CAP_KVMCLOCK_CTRL);
int ret;
if (running) {
struct kvm_clock_data data = {};
uint64_t pvclock_via_mem = 0;
/*
* If the host where s->clock was read did not support reliable
* KVM_GET_CLOCK, read kvmclock value from memory.
*/
if (!s->clock_is_reliable) {
pvclock_via_mem = kvmclock_current_nsec(s);
}
WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
Dr David Alan Gilbert <dgilbert@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Radim Krcmar <rkrcmar@redhat.com>
Subject: Re: [Qemu-devel] [qemu patch V4 2/2] kvmclock: reduce kvmclock difference on migration
Date: Mon, 12 Dec 2016 17:44:52 -0200 [thread overview]
Message-ID: <20161212194451.GA20241@amt.cnet> (raw)
In-Reply-To: <20161212180105.GF3808@thinpad.lan.raisama.net>
On Mon, Dec 12, 2016 at 04:01:05PM -0200, Eduardo Habkost wrote:
> On Sat, Dec 10, 2016 at 03:21:50PM -0200, Marcelo Tosatti wrote:
> [...]
> > static void kvmclock_realize(DeviceState *dev, Error **errp)
> > {
> > KVMClockState *s = KVM_CLOCK(dev);
> >
> > + if (kvm_has_adjust_clock_stable()) {
> > + s->clock_is_reliable = true;
> > + }
> > +
>
> This seems unnecessary, as kvmclock_vm_state_change() makes sure
> it is set at the same time as s->clock. Should we just remove it?
There is this initialization that goes from ~running -> running
which assumes its initialized:
static void kvmclock_vm_state_change(void *opaque, int running,
RunState state)
{
KVMClockState *s = opaque;
CPUState *cpu;
int cap_clock_ctrl = kvm_check_extension(kvm_state,
KVM_CAP_KVMCLOCK_CTRL);
int ret;
if (running) {
struct kvm_clock_data data = {};
uint64_t pvclock_via_mem = 0;
/*
* If the host where s->clock was read did not support reliable
* KVM_GET_CLOCK, read kvmclock value from memory.
*/
if (!s->clock_is_reliable) {
pvclock_via_mem = kvmclock_current_nsec(s);
}
next prev parent reply other threads:[~2016-12-12 19:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-10 17:21 [qemu patch V4 0/2] improve kvmclock difference on migration Marcelo Tosatti
2016-12-10 17:21 ` [Qemu-devel] " Marcelo Tosatti
2016-12-10 17:21 ` [qemu patch V4 1/2] kvm: sync linux headers Marcelo Tosatti
2016-12-10 17:21 ` [Qemu-devel] " Marcelo Tosatti
2016-12-10 17:21 ` [qemu patch V4 2/2] kvmclock: reduce kvmclock difference on migration Marcelo Tosatti
2016-12-10 17:21 ` [Qemu-devel] " Marcelo Tosatti
2016-12-12 7:36 ` Pankaj Gupta
2016-12-12 11:22 ` Marcelo Tosatti
2016-12-12 14:24 ` Pankaj Gupta
2016-12-13 1:32 ` Pankaj Gupta
2016-12-12 18:01 ` Eduardo Habkost
2016-12-12 18:01 ` [Qemu-devel] " Eduardo Habkost
2016-12-12 19:44 ` Marcelo Tosatti [this message]
2016-12-12 19:44 ` Marcelo Tosatti
2016-12-12 19:57 ` Eduardo Habkost
2016-12-12 19:57 ` [Qemu-devel] " Eduardo Habkost
2016-12-16 10:03 ` Paolo Bonzini
2016-12-16 10:03 ` [Qemu-devel] " Paolo Bonzini
2016-12-16 13:41 ` Eduardo Habkost
2016-12-16 13:41 ` [Qemu-devel] " Eduardo Habkost
2016-12-16 15:59 ` Marcelo Tosatti
2016-12-16 15:59 ` [Qemu-devel] " 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=20161212194451.GA20241@amt.cnet \
--to=mtosatti@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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 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.