]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
KVM: MMU: reschedule during shadow teardown
authorAvi Kivity <avi@qumranet.com>
Wed, 4 Jun 2008 15:42:24 +0000 (18:42 +0300)
committerAvi Kivity <avi@qumranet.com>
Fri, 6 Jun 2008 18:32:20 +0000 (21:32 +0300)
Shadows for large guests can take a long time to tear down, so reschedule
occasionally to avoid softlockup warnings.

Signed-off-by: Avi Kivity <avi@qumranet.com>
arch/x86/kvm/mmu.c

index 7246b60afb96a19d32e2d158749bf10fad553470..c2fd6a4a58c38815e97d1d15c66dbb4b51f30122 100644 (file)
@@ -1858,6 +1858,7 @@ static void free_mmu_pages(struct kvm_vcpu *vcpu)
                sp = container_of(vcpu->kvm->arch.active_mmu_pages.next,
                                  struct kvm_mmu_page, link);
                kvm_mmu_zap_page(vcpu->kvm, sp);
+               cond_resched();
        }
        free_page((unsigned long)vcpu->arch.mmu.pae_root);
 }