Re: non-root mode and preemption

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

 



On 13/06/2016 12:06, Oscar Fernando Garcia wrote:
> Good Morning,
> 
> I have a simple question. In KVM code: /arch/x86/kvm/x86.c when the
> function vcpu_enter_guest is called, the run function (
> kvm_x86_ops->run(vcpu)) is called with preemption and irqs disabled.
> My question is, running in non-root mode with preemption and irqs
> disabled affects the latency of other processes or VPCUs running in the
> same CPU?

Even though kvm_x86_ops->run itself is called with interrupts disabled,
interrupts are enabled while the guest runs.  Instead of being serviced
immediately by the processor, however, they cause a vmexit.  The
interrupt routine is then called during
kvm_x86_ops->handle_external_intr, and preemption is enabled again soon
after that in vcpu_enter_guest.

The extra latency introduced by KVM is very low, around 1000 clock
cycles or less than a microsecond.

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