KVM: MMU: drop zeroing on mmu_memory_cache_alloc
Zeroing on mmu_memory_cache_alloc is unnecessary since:
- Smaller areas are pre-allocated with kmem_cache_zalloc.
- Page pointed by ->spt is overwritten with prefetch_page and entries in page pointed by ->gfns are initialized before reading.
[avi: zeroing pages is unnecessary]
Signed-off-by Marcelo Tosatti <[email protected]>
arch/x86/kvm/mmu.c +0 -1
@@ -352,7 +352,6 @@ static void *mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc,BUG_ON (!mc->nobjs); p = mc->objects[--mc->nobjs]; -memset (p,0 , size);return p; }
Avi Kivity
AppliedQuoted 10 lines · Marcelo Tosatti
Zeroing on
mmu_memory_cache_allocis unnecessary since:- Smaller areas are pre-allocated with
kmem_cache_zalloc.
- Page pointed by ->spt is overwritten withprefetch_pageand entries in page pointed by ->gfns are initialized before reading.[avi: zeroing pages is unnecessary]
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function