Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103751
b: refs/heads/master
c: 5a4c928
h: refs/heads/master
i:
  103749: b0d1a5c
  103747: 01502e0
  103743: 1c01851
v: v3
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Jul 20, 2008
1 parent 24e81ff commit d802827
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e37c2998a5a0b00134f6227167694b710f57ac0
refs/heads/master: 5a4c92880493945678315a6df810f7a21f55b985
3 changes: 3 additions & 0 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,8 @@ static int mmu_shrink(int nr_to_scan, gfp_t gfp_mask)
list_for_each_entry(kvm, &vm_list, vm_list) {
int npages;

if (!down_read_trylock(&kvm->slots_lock))
continue;
spin_lock(&kvm->mmu_lock);
npages = kvm->arch.n_alloc_mmu_pages -
kvm->arch.n_free_mmu_pages;
Expand All @@ -1999,6 +2001,7 @@ static int mmu_shrink(int nr_to_scan, gfp_t gfp_mask)
nr_to_scan--;

spin_unlock(&kvm->mmu_lock);
up_read(&kvm->slots_lock);
}
if (kvm_freed)
list_move_tail(&kvm_freed->vm_list, &vm_list);
Expand Down

0 comments on commit d802827

Please sign in to comment.