Re: [qemu patch V2 2/2] kvmclock: reduce kvmclock difference on migration

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux