kvm: Record the preemption status of vcpus using preempt notifiers
Note that we mark as preempted only when vcpu's task state was Running during preemption. Thanks Jiannan, Avi for preemption notifier ideas. Thanks Gleb, PeterZ for their precious suggestions. Thanks Srikar for an idea on avoiding rcu lock while checking task state that improved overcommit numbers. Reviewed-by: Chegu Vinod <chegu_vinod@hp.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
This commit is contained in:

committed by
Gleb Natapov

parent
5da596078f
commit
3a08a8f9f0
@@ -253,6 +253,7 @@ struct kvm_vcpu {
|
||||
bool dy_eligible;
|
||||
} spin_loop;
|
||||
#endif
|
||||
bool preempted;
|
||||
struct kvm_vcpu_arch arch;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user