diff options
author | Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp> | 2013-12-13 01:07:21 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-12-13 08:23:45 -0500 |
commit | c08ac06ab3f3cdb8d34376c3a8a5e46a31a62c8f (patch) | |
tree | 775a9dadbab5d86bd83a264ece99d42079bbdb50 /virt/kvm/kvm_main.c | |
parent | 6bb05ef78553491b2e2e0710dde364331dc3cdd2 (diff) |
KVM: Use cond_resched() directly and remove useless kvm_resched()
Since the commit 15ad7146 ("KVM: Use the scheduler preemption notifiers
to make kvm preemptible"), the remaining stuff in this function is a
simple cond_resched() call with an extra need_resched() check which was
there to avoid dropping VCPUs unnecessarily. Now it is meaningless.
Signed-off-by: Takuya Yoshikawa <yoshikawa_takuya_b1@lab.ntt.co.jp>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm/kvm_main.c')
-rw-r--r-- | virt/kvm/kvm_main.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a0aa84b5941a..03c97e7ae4ca 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -1710,14 +1710,6 @@ void kvm_vcpu_kick(struct kvm_vcpu *vcpu) | |||
1710 | EXPORT_SYMBOL_GPL(kvm_vcpu_kick); | 1710 | EXPORT_SYMBOL_GPL(kvm_vcpu_kick); |
1711 | #endif /* !CONFIG_S390 */ | 1711 | #endif /* !CONFIG_S390 */ |
1712 | 1712 | ||
1713 | void kvm_resched(struct kvm_vcpu *vcpu) | ||
1714 | { | ||
1715 | if (!need_resched()) | ||
1716 | return; | ||
1717 | cond_resched(); | ||
1718 | } | ||
1719 | EXPORT_SYMBOL_GPL(kvm_resched); | ||
1720 | |||
1721 | bool kvm_vcpu_yield_to(struct kvm_vcpu *target) | 1713 | bool kvm_vcpu_yield_to(struct kvm_vcpu *target) |
1722 | { | 1714 | { |
1723 | struct pid *pid; | 1715 | struct pid *pid; |