Re: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-25 Thread Avi Kivity

Hollis Blanchard wrote:

When the VM exits, we must call put_page() for every page referenced in the
shadow TLB.

Without this patch, we usually leak 30-50 host pages (120 - 200 KiB with 4 KiB
pages). The maximum number of pages leaked is the size of our shadow TLB, 64
pages.

Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
---
The obvious question is why didn't we see this before? Basically, we'd never
looked for it, and since most of our work was in the kernel we always ended up
rebooting before exhausting host memory.

Since it's such a large leak, and a simple fix, please commit this for 2.6.28.
This patch does apply to kvm.git with fuzz, but if you prefer I can send a
separate patch for that later.
  


Applied on both master and the 2.6.28 queue.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-25 Thread Liu Yu
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard
 Sent: Tuesday, November 25, 2008 1:38 AM
 To: Avi Kivity
 Cc: kvm-ppc; kvm
 Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit
 
 When the VM exits, we must call put_page() for every page 
 referenced in the
 shadow TLB.
 
 Without this patch, we usually leak 30-50 host pages (120 - 
 200 KiB with 4 KiB
 pages). The maximum number of pages leaked is the size of our 
 shadow TLB, 64
 pages.
 
 Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]

Need it also to _tlbia() at vcpu_uninit?
--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-25 Thread Avi Kivity

Hollis Blanchard wrote:

When the VM exits, we must call put_page() for every page referenced in the
shadow TLB.

Without this patch, we usually leak 30-50 host pages (120 - 200 KiB with 4 KiB
pages). The maximum number of pages leaked is the size of our shadow TLB, 64
pages.

Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
---
The obvious question is why didn't we see this before? Basically, we'd never
looked for it, and since most of our work was in the kernel we always ended up
rebooting before exhausting host memory.

Since it's such a large leak, and a simple fix, please commit this for 2.6.28.
This patch does apply to kvm.git with fuzz, but if you prefer I can send a
separate patch for that later.
  


Applied on both master and the 2.6.28 queue.


--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-25 Thread Hollis Blanchard
On Tue, 2008-11-25 at 16:32 +0800, Liu Yu wrote:
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard
  Sent: Tuesday, November 25, 2008 1:38 AM
  To: Avi Kivity
  Cc: kvm-ppc; kvm
  Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit
  
  When the VM exits, we must call put_page() for every page 
  referenced in the
  shadow TLB.
  
  Without this patch, we usually leak 30-50 host pages (120 - 
  200 KiB with 4 KiB
  pages). The maximum number of pages leaked is the size of our 
  shadow TLB, 64
  pages.
  
  Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
 
 Need it also to _tlbia() at vcpu_uninit?

No, because by the time we hit kvm_arch_vcpu_uninit(),
kvm_arch_vcpu_put() has already been called.

-- 
Hollis Blanchard
IBM Linux Technology Center

--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-24 Thread Liu Yu

Good catch.
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard
 Sent: Tuesday, November 25, 2008 1:38 AM
 To: Avi Kivity
 Cc: kvm-ppc; kvm
 Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit
 
 When the VM exits, we must call put_page() for every page 
 referenced in the
 shadow TLB.
 
 Without this patch, we usually leak 30-50 host pages (120 - 
 200 KiB with 4 KiB
 pages). The maximum number of pages leaked is the size of our 
 shadow TLB, 64
 pages.
 
 Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
 ---
 The obvious question is why didn't we see this before? 
 Basically, we'd never
 looked for it, and since most of our work was in the kernel 
 we always ended up
 rebooting before exhausting host memory.
 
 Since it's such a large leak, and a simple fix, please commit 
 this for 2.6.28.
 This patch does apply to kvm.git with fuzz, but if you prefer 
 I can send a
 separate patch for that later.
 
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] kvm: ppc: stop leaking host memory on VM exit

2008-11-24 Thread Liu Yu

Good catch.
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Hollis Blanchard
 Sent: Tuesday, November 25, 2008 1:38 AM
 To: Avi Kivity
 Cc: kvm-ppc; kvm
 Subject: [PATCH] kvm: ppc: stop leaking host memory on VM exit
 
 When the VM exits, we must call put_page() for every page 
 referenced in the
 shadow TLB.
 
 Without this patch, we usually leak 30-50 host pages (120 - 
 200 KiB with 4 KiB
 pages). The maximum number of pages leaked is the size of our 
 shadow TLB, 64
 pages.
 
 Signed-off-by: Hollis Blanchard [EMAIL PROTECTED]
 ---
 The obvious question is why didn't we see this before? 
 Basically, we'd never
 looked for it, and since most of our work was in the kernel 
 we always ended up
 rebooting before exhausting host memory.
 
 Since it's such a large leak, and a simple fix, please commit 
 this for 2.6.28.
 This patch does apply to kvm.git with fuzz, but if you prefer 
 I can send a
 separate patch for that later.
 
--
To unsubscribe from this list: send the line unsubscribe kvm-ppc in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html