kvm: Record the preemption status of vcpus using preempt notifiers
authorRaghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Mon, 4 Mar 2013 18:02:07 +0000 (23:32 +0530)
committerGleb Natapov <gleb@redhat.com>
Mon, 11 Mar 2013 09:37:08 +0000 (11:37 +0200)
commit3a08a8f9f0936e182d387afd85fdc5d303381521
tree092f3ba314b1822b84fa24af6f211c9388bc566d
parent5da596078f915a62e39a20e582308eab91b88c9a
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>
include/linux/kvm_host.h
virt/kvm/kvm_main.c