aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRaghavendra K T <raghavendra.kt@linux.vnet.ibm.com>2013-03-04 13:02:07 -0500
committerGleb Natapov <gleb@redhat.com>2013-03-11 05:37:08 -0400
commit3a08a8f9f0936e182d387afd85fdc5d303381521 (patch)
tree092f3ba314b1822b84fa24af6f211c9388bc566d /include
parent5da596078f915a62e39a20e582308eab91b88c9a (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 9fa13ebc3381..0f4941a9c9c8 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -253,6 +253,7 @@ struct kvm_vcpu {
253 bool dy_eligible; 253 bool dy_eligible;
254 } spin_loop; 254 } spin_loop;
255#endif 255#endif
256 bool preempted;
256 struct kvm_vcpu_arch arch; 257 struct kvm_vcpu_arch arch;
257}; 258};
258 259