From: Kirill A. Shutemov Date: Thu, 29 Nov 2012 03:17:34 +0000 (+1100) Subject: thp-huge-zero-page-basic-preparation-v6 X-Git-Tag: next-20121205~1^2~275 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f46501f4e126af22c1f95406ed61cfb0ec767abd;p=karo-tx-linux.git thp-huge-zero-page-basic-preparation-v6 Huge zero page (hzp) is a non-movable huge page (2M on x86-64) filled with zeros. For now let's allocate the page on hugepage_init(). We'll switch to lazy allocation later. We are not going to map the huge zero page until we can handle it properly on all code paths. is_huge_zero_{pfn,pmd}() functions will be used by following patches to check whether the pfn/pmd is huge zero page. Signed-off-by: Kirill A. Shutemov Acked-by: David Rientjes Cc: Andrea Arcangeli Cc: Andi Kleen Cc: "H. Peter Anvin" Cc: Mel Gorman Signed-off-by: Andrew Morton --- diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 2bef4e403fac..b544f12728be 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -161,7 +161,7 @@ static int start_khugepaged(void) return err; } -static int init_huge_zero_page(void) +static int __init init_huge_zero_page(void) { struct page *hpage;