Re: [PATCH 1/1] hugetlb: pull gigantic page initialisation out ofthe default path

From: Andrew Morton
Date: Fri Oct 10 2008 - 17:55:13 EST


On Wed, 8 Oct 2008 23:31:45 +1100
Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:

> On Wednesday 08 October 2008 20:34, Andy Whitcroft wrote:
> > 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.
>
> Thanks for doing this. Can prep_compound_gigantic_page be #ifdef HUGETLB?

Yup.

--- a/mm/page_alloc.c~hugetlb-pull-gigantic-page-initialisation-out-of-the-default-path-fix
+++ a/mm/page_alloc.c
@@ -280,6 +280,7 @@ void prep_compound_page(struct page *pag
}
}

+#ifdef CONFIG_HUGETLBFS
void prep_compound_gigantic_page(struct page *page, unsigned long order)
{
int i;
@@ -294,6 +295,7 @@ void prep_compound_gigantic_page(struct
p->first_page = page;
}
}
+#endif

static void destroy_compound_page(struct page *page, unsigned long order)
{
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/