projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6c69ee
)
KVM: VMX: Avoid unnecessary vcpu_load()/vcpu_put() cycles
author
Yaozu Dong
<eddie.dong@intel.com>
Wed, 25 Apr 2007 13:49:19 +0000
(16:49 +0300)
committer
Avi Kivity
<avi@qumranet.com>
Thu, 3 May 2007 07:52:30 +0000
(10:52 +0300)
By checking if a reschedule is needed, we avoid dropping the vcpu.
[With changes by me, based on Anthony Liguori's observations]
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/kvm/kvm_main.c
b/drivers/kvm/kvm_main.c
index 03c0ee74d7578e0c7ab70f1d54c267b59afabc73..f5356358acff50d57ffad93fbd4fd4a09544aa53 100644
(file)
--- a/
drivers/kvm/kvm_main.c
+++ b/
drivers/kvm/kvm_main.c
@@
-1590,6
+1590,8
@@
static int set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
void kvm_resched(struct kvm_vcpu *vcpu)
{
+ if (!need_resched())
+ return;
vcpu_put(vcpu);
cond_resched();
vcpu_load(vcpu);