]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: do not iterate over all VMs in mmu_shrink()
authorGleb Natapov <gleb@redhat.com>
Mon, 4 Jun 2012 11:53:23 +0000 (14:53 +0300)
committerAvi Kivity <avi@redhat.com>
Tue, 5 Jun 2012 14:46:43 +0000 (17:46 +0300)
commita5bd78f1d9804feaaf7f6ed2fc6181d86dd0751b
tree0f6a1904bffb0d59e9b74a46fb175207106436de
parent0cd28491d831f0408c33d03cc09fd2be16d5f17a
KVM: MMU: do not iterate over all VMs in mmu_shrink()

mmu_shrink() needlessly iterates over all VMs even though it will not
attempt to free mmu pages from more than one on them. Fix that and also
check used mmu pages count outside of VM lock to skip inactive VMs faster.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c