Re: [PATCH v3] KVM: X86: Just one leader to trigger kvmclock sync request

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

 



On 02/03/20 14:01, Vitaly Kuznetsov wrote:
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -9389,11 +9389,9 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
>  
>         mutex_unlock(&vcpu->mutex);
>  
> -       if (!kvmclock_periodic_sync)
> -               return;
> -
> -       schedule_delayed_work(&kvm->arch.kvmclock_sync_work,
> -                                       KVMCLOCK_SYNC_PERIOD);
> +       if (vcpu->vcpu_idx == 0 && kvmclock_periodic_sync)
> +               schedule_delayed_work(&kvm->arch.kvmclock_sync_work,
> +                                     KVMCLOCK_SYNC_PERIOD);
>  }

> Reviewed-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>

Good idea, I squashed the change.

Paolo




[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