Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-20 Thread Marcelo Tosatti
On Fri, Jul 20, 2012 at 10:04:34AM +0900, Takuya Yoshikawa wrote: On Wed, 18 Jul 2012 17:52:46 -0300 Marcelo Tosatti mtosa...@redhat.com wrote: Can't understand, can you please expand more clearly? I think mmu pages are not worth freeing under usual memory pressure, especially when we

Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-19 Thread Takuya Yoshikawa
On Wed, 18 Jul 2012 17:52:46 -0300 Marcelo Tosatti mtosa...@redhat.com wrote: Can't understand, can you please expand more clearly? I think mmu pages are not worth freeing under usual memory pressure, especially when we have EPT/NPT on. What's happening: shrink_slab() vainly calls

Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-18 Thread Marcelo Tosatti
On Thu, Jul 12, 2012 at 06:35:09PM +0900, Takuya Yoshikawa wrote: On Thu, 5 Jul 2012 23:05:46 +0900 Takuya Yoshikawa takuya.yoshik...@gmail.com wrote: On Thu, 5 Jul 2012 14:50:00 +0300 Gleb Natapov g...@redhat.com wrote: Note that if (!nr_to_scan--) check is removed since we do not

Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-12 Thread Takuya Yoshikawa
On Thu, 5 Jul 2012 23:05:46 +0900 Takuya Yoshikawa takuya.yoshik...@gmail.com wrote: On Thu, 5 Jul 2012 14:50:00 +0300 Gleb Natapov g...@redhat.com wrote: Note that if (!nr_to_scan--) check is removed since we do not try to free mmu pages from more than one VM. IIRC this was

[PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-05 Thread Takuya Yoshikawa
The following commit changed mmu_shrink() so that it would skip VMs whose n_used_mmu_pages is not zero and try to free pages from others: commit 1952639665e92481c34c34c3e2a71bf3e66ba362 KVM: MMU: do not iterate over all VMs in mmu_shrink() This patch fixes the function so that it can free

Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-05 Thread Gleb Natapov
On Thu, Jul 05, 2012 at 07:56:07PM +0900, Takuya Yoshikawa wrote: The following commit changed mmu_shrink() so that it would skip VMs whose n_used_mmu_pages is not zero and try to free pages from others: Oops, commit 1952639665e92481c34c34c3e2a71bf3e66ba362 KVM: MMU: do not iterate over

Re: [PATCH] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-07-05 Thread Takuya Yoshikawa
On Thu, 5 Jul 2012 14:50:00 +0300 Gleb Natapov g...@redhat.com wrote: Note that if (!nr_to_scan--) check is removed since we do not try to free mmu pages from more than one VM. IIRC this was proposed in the past that we should iterate over vm list until freeing something eventually, but