]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
thp-huge-zero-page-basic-preparation-v6
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 29 Nov 2012 03:17:34 +0000 (14:17 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:14 +0000 (16:23 +1100)
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 <kirill.shutemov@linux.intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@linux.intel.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index 2bef4e403face1d0f14bedef1cf30e882a249ac9..b544f12728bea506b8da61f9916173295e97a8dc 100644 (file)
@@ -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;