On Wed, Feb 26, 2014 at 8:44 PM, Christian Borntraeger
<[email protected]> wrote:
> From: Michael Mueller <[email protected]>
>
> Use the arch specific function kvm_arch_vcpu_runnable() to add a further
> criterium to identify a suitable vcpu to yield to during undirected yield
> processing.
>
> Signed-off-by: Michael Mueller <[email protected]>
> Reviewed-by: Christian Borntraeger <[email protected]>
> Signed-off-by: Christian Borntraeger <[email protected]>
> ---
>  virt/kvm/kvm_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index f5668a4..5fd4cf8 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1801,7 +1801,7 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me)
>                                 continue;
>                         if (vcpu == me)
>                                 continue;
> -                       if (waitqueue_active(&vcpu->wq))
> +                       if (waitqueue_active(&vcpu->wq) && 
> !kvm_arch_vcpu_runnable(vcpu))
>                                 continue;
>                         if (!kvm_vcpu_eligible_for_directed_yield(vcpu))
>                                 continue;
> --
> 1.8.4.2
>

I ran kernbench/sysbench/ebizzy on x86 guest to confirm that this did
not have any adverse effect in ple handler path.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to