Re: [RFC][PATCH 3/9] replace x86 kvm n_free_mmu_pages with n_used_mmu_pages

2010-06-16 Thread Marcelo Tosatti
On Tue, Jun 15, 2010 at 06:55:22AM -0700, Dave Hansen wrote: I think doing this makes the code much more readable. That's borne out by the fact that this patch removes code. used also happens to be the number that we need to return back to the slab code when our shrinker gets called.

Re: [RFC][PATCH 3/9] replace x86 kvm n_free_mmu_pages with n_used_mmu_pages

2010-06-16 Thread Dave Hansen
On Wed, 2010-06-16 at 11:25 -0300, Marcelo Tosatti wrote: - if (used_pages kvm_nr_mmu_pages) { - while (used_pages kvm_nr_mmu_pages + if (kvm-arch.n_used_mmu_pages goal_nr_mmu_pages) { + while (kvm-arch.n_used_mmu_pages goal_nr_mmu_pages

[RFC][PATCH 3/9] replace x86 kvm n_free_mmu_pages with n_used_mmu_pages

2010-06-15 Thread Dave Hansen
I think doing this makes the code much more readable. That's borne out by the fact that this patch removes code. used also happens to be the number that we need to return back to the slab code when our shrinker gets called. Keeping this value as opposed to free makes the next patch simpler.