qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [qemu patch V2 2/2] kvmclock: reduce kvmclock differenc


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [qemu patch V2 2/2] kvmclock: reduce kvmclock difference on migration
Date: Thu, 17 Nov 2016 15:41:22 -0200
User-agent: Mutt/1.7.0 (2016-08-17)

On Thu, Nov 17, 2016 at 02:30:52PM -0200, Marcelo Tosatti wrote:
> On Thu, Nov 17, 2016 at 03:15:03PM +0100, Paolo Bonzini wrote:
> > On 17/11/2016 15:11, Eduardo Habkost wrote:
> > > On Thu, Nov 17, 2016 at 11:24:13AM -0200, Marcelo Tosatti wrote:
[...]
> > > What exactly ensures src_use_reliable_get_clock is correctly
> > > initialized on the migration destination as well?
> > > 
> > >> +
> > >> +    return s->mach_use_reliable_get_clock;
> > > 
> > > If if kvm_has_adjust_clock_stable() is false, isn't it simpler to
> > > simply skip the section?
> > 
> > This is what I asked for. :)
> > 
> > However, I was proposing a different way to initialize
> > src_use_reliable_get_clock.  I still have to understand exactly how
> > Marcelo's algorithm works because (based on the kvmclock code) it's more
> > trick than it seems.
> > 
> > Paolo
> 
> You asked me to return s->mach_use_reliable_get_clock:
> 
> >>> +     * avoids reading kvmclock from memory.
> >>> +     */
> >>> +    if (s->mach_use_reliable_get_clock &&
> >>> kvm_has_adjust_clock_stable()) {
> >>> +        s->src_use_reliable_get_clock = true;
> >>> +    }
> >>> +
> >>> +    return s->src_use_reliable_get_clock;
> >>> +}
> >>
> >> Here you can just return s->mach_use_reliable_get_clock.
> >
> > mach_use_reliable_get_clock can be true but host might not support it.
> 
> Yes, but the "needed" function is only required to avoid breaking
> pc-i440fx-2.7 and earlier.  If you return true here, you can still
> migrate a "false" value for src_use_reliable_get_clock.
> 
> ===================
> 
> I don't see why avoid the subsection, since new machine type is 
> incompatible anyway. So Eduardo on your suggestion to 
> skip sending the subsection, what is the advantage?

I believe the main (only?) advantage is that it can make the code
simpler: if you simply skip the section if the field is false,
you don't even need two separate fields.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]