public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* KVM: MMU: increase per-vcpu rmap cache alloc size
@ 2008-10-28 20:16 Marcelo Tosatti
  2008-10-29  9:42 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2008-10-28 20:16 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel


The page fault path can use two rmap_desc structures, if:

- walk_addr's dirty pte update allocates one rmap_desc.
- mmu_lock is dropped, sptes are zapped resulting in rmap_desc being
freed.
- fetch->mmu_set_spte allocates another rmap_desc.

Increase to 4 for safety.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>


diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 79cb4a9..2477a24 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -316,7 +316,7 @@ static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu)
 	if (r)
 		goto out;
 	r = mmu_topup_memory_cache(&vcpu->arch.mmu_rmap_desc_cache,
-				   rmap_desc_cache, 1);
+				   rmap_desc_cache, 4);
 	if (r)
 		goto out;
 	r = mmu_topup_memory_cache_page(&vcpu->arch.mmu_page_cache, 8);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: KVM: MMU: increase per-vcpu rmap cache alloc size
  2008-10-28 20:16 KVM: MMU: increase per-vcpu rmap cache alloc size Marcelo Tosatti
@ 2008-10-29  9:42 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-10-29  9:42 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: kvm-devel

Marcelo Tosatti wrote:
> The page fault path can use two rmap_desc structures, if:
>
> - walk_addr's dirty pte update allocates one rmap_desc.
> - mmu_lock is dropped, sptes are zapped resulting in rmap_desc being
> freed.
> - fetch->mmu_set_spte allocates another rmap_desc.
>
> Increase to 4 for safety.
>   

Applied and queued for 2.6.28, thanks.

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-29  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-28 20:16 KVM: MMU: increase per-vcpu rmap cache alloc size Marcelo Tosatti
2008-10-29  9:42 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox