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

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

 




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?
> 
--
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