Re: [PATCH] KVM: X86: set vcpu preempted only if it is preempted

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

 



On 1/12/22 18:30, Sean Christopherson wrote:
Uhhmm, why not? Who says the vcpu will run the moment it becomes
runnable again? Another task could be woken up meanwhile occupying the
real cpu.
Hrm, but when emulating HLT, e.g. for an idling vCPU, KVM will voluntarily schedule
out the vCPU and mark it as preempted from the guest's perspective.  The vast majority,
probably all, usage of steal_time.preempted expects it to truly mean "preempted" as
opposed to "not running".

I'm not sure about that. In particular, PV TLB shootdown benefits from treating a halted vCPU as preempted, because it avoids wakeups of the halted vCPUs.

kvm_smp_send_call_func_ipi might not, though.

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