mm/sparse: optimize sparse_index_alloc
authorGavin Shan <shangw@linux.vnet.ibm.com>
Tue, 31 Jul 2012 23:46:02 +0000 (16:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Aug 2012 01:42:49 +0000 (18:42 -0700)
commit5b760e64a64c8940cdccd0ba6fce19a9bd010d20
treeb4765cd744dd5710ba6cd4d784185247dc317cef
parentb214514592d2dcb0b9d14ee8dd14f3699e3b0a84
mm/sparse: optimize sparse_index_alloc

With CONFIG_SPARSEMEM_EXTREME, the two levels of memory section
descriptors are allocated from slab or bootmem.  When allocating from
slab, let slab/bootmem allocator clear the memory chunk.  We needn't clear
it explicitly.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/sparse.c