答复: [PATCH][resend] KVM: x86: Yield to IPI target vCPU only if it is busy

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

 



> On Fri, 25 Feb 2022 at 23:04, Li RongQing <lirongqing@xxxxxxxxx> wrote:
> >
> > When sending a call-function IPI-many to vCPUs, yield to the IPI
> > target vCPU which is marked as preempted.
> >
> > but when emulating HLT, an idling vCPU will be voluntarily scheduled
> > out and mark as preempted from the guest kernel perspective. yielding
> > to idle vCPU is pointless and increase unnecessary vmexit, maybe miss
> > the true preempted vCPU
> >
> > so yield to IPI target vCPU only if vCPU is busy and preempted
> 
> This is not correct, there is an intention to boost the reactivation of idle vCPU,
> PV sched yield is used in over-subscribe scenario and the pCPU which idle vCPU is
> resident maybe busy, and the vCPU will wait in the host scheduler run queue.
> There is a research paper [1] focusing on this boost and showing better
> performance numbers, though their boost is more unfair.
> 
> [1]. https://ieeexplore.ieee.org/document/8526900
> "Accelerating Idle vCPU Reactivation"
> 
>     Wanpeng


I understand that over-subscribe system is not always over- subscribe, it should sometime true, sometime not.
Without this patch, it will hard the performance when cpu is not over-subscribe.

And yielding to a not ready vcpu is unnecessary as kvm_sched_yield

static void kvm_sched_yield(struct kvm_vcpu *vcpu, unsigned long dest_id)
{
 
     if (!target || !READ_ONCE(target->ready))
          goto no_yield;
}

-Li







[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