• Raghavendra K T's avatar
    KVM: Choose better candidate for directed yield · 06e48c51
    Raghavendra K T authored
    Currently, on a large vcpu guests, there is a high probability of
    yielding to the same vcpu who had recently done a pause-loop exit or
    cpu relax intercepted. Such a yield can lead to the vcpu spinning
    again and hence degrade the performance.
    
    The patchset keeps track of the pause loop exit/cpu relax interception
    and gives chance to a vcpu which:
     (a) Has not done pause loop exit or cpu relax intercepted at all
         (probably he is preempted lock-holder)
     (b) Was skipped in last iteration because it did pause loop exit or
         cpu relax intercepted, and probably has become eligible now
         (next eligible lock holder)
    Signed-off-by: default avatarRaghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Reviewed-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    Reviewed-by: default avatarRik van Riel <riel@redhat.com>
    Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> # on s390x
    Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
    06e48c51
kvm_main.c 63.5 KB