mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
kvm: Iterate over only vcpus that are preempted
This helps in filtering out the eligible candidates further and thus potentially helps in quickly allowing preempted lockholders to run. Note that if a vcpu was spinning during preemption we filter them by checking whether they are preempted due to pause loop exit. Reviewed-by: Chegu Vinod <[email protected]> Reviewed-by: Marcelo Tosatti <[email protected]> Signed-off-by: Raghavendra K T <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
This commit is contained in:
parent
3a08a8f9f0
commit
7bc7ae25b1
1 changed files with 2 additions and 0 deletions
|
|
@ -1768,6 +1768,8 @@ void kvm_vcpu_on_spin(struct kvm_vcpu *me)
|
|||
continue;
|
||||
} else if (pass && i > last_boosted_vcpu)
|
||||
break;
|
||||
if (!ACCESS_ONCE(vcpu->preempted))
|
||||
continue;
|
||||
if (vcpu == me)
|
||||
continue;
|
||||
if (waitqueue_active(&vcpu->wq))
|
||||
|
|
|
|||
Loading…
Reference in a new issue