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

From: Dave Hansen
Date: Wed Jun 16 2010 - 11:42:43 EST


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 &&
> > !list_empty(&kvm->arch.active_mmu_pages)) {
> > struct kvm_mmu_page *page;
> >
> > page = container_of(kvm->arch.active_mmu_pages.prev,
> > struct kvm_mmu_page, link);
> > - used_pages -= kvm_mmu_zap_page(kvm, page);
> > - used_pages--;
> > + kvm->arch.n_used_mmu_pages -= kvm_mmu_zap_page(kvm, page);
> > + kvm->arch.n_used_mmu_pages--;
>
> kvm->arch.n_used_mmu_pages is deaccounted for in kvm_mmu_zap_page ->
> kvm_mmu_free_page
> already.

Ahh, I see that now. Thanks!

-- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/