hugetlb: pull gigantic page initialisation out of the default path
authorAndy Whitcroft <apw@shadowen.org>
Fri, 7 Nov 2008 00:06:05 +0000 (00:06 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 13 Nov 2008 17:55:56 +0000 (09:55 -0800)
commit75187a3094a68015582b344161c18b86ab60e665
tree6b4905ef008694b3d45f1330bddd06629fe8f4ab
parent880eaf154bc95220798e85802cdd9cb6534ee7a7
hugetlb: pull gigantic page initialisation out of the default path

commit 18229df5b613ed0732a766fc37850de2e7988e43 upstream

As we can determine exactly when a gigantic page is in use we can optimise
the common regular page cases by pulling out gigantic page initialisation
into its own function.  As gigantic pages are never released to buddy we
do not need a destructor.  This effectivly reverts the previous change to
the main buddy allocator.  It also adds a paranoid check to ensure we
never release gigantic pages from hugetlbfs to the main buddy.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/hugetlb.c
mm/internal.h
mm/page_alloc.c