mm, x86: Remove debug_pagealloc_enabled
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 29 Nov 2011 16:05:11 +0000 (17:05 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 6 Dec 2011 08:24:07 +0000 (09:24 +0100)
When (no)bootmem finish operation, it pass pages to buddy
allocator. Since debug_pagealloc_enabled is not set, we will do
not protect pages, what is not what we want with
CONFIG_DEBUG_PAGEALLOC=y.

To fix remove debug_pagealloc_enabled. That variable was
introduced by commit 12d6f21e "x86: do not PSE on
CONFIG_DEBUG_PAGEALLOC=y" to get more CPA (change page
attribude) code testing. But currently we have CONFIG_CPA_DEBUG,
which test CPA.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/1322582711-14571-1-git-send-email-sgruszka@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/pageattr.c
include/linux/mm.h
init/main.c
mm/debug-pagealloc.c

index f9e526742fa1817750e0cf591d23ca910ab3fbba..5031eefa051f9f6f105847970248295cc03b6234 100644 (file)
@@ -1333,12 +1333,6 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
                                           numpages * PAGE_SIZE);
        }
 
-       /*
-        * If page allocator is not up yet then do not call c_p_a():
-        */
-       if (!debug_pagealloc_enabled)
-               return;
-
        /*
         * The return value is ignored as the calls cannot fail.
         * Large pages for identity mappings are not used at boot time
index 3dc3a8c2c4858a1d3400aa2d5fd029d36a1177c6..0a22db1447532d39c03c8a0741743fced35ca4d1 100644 (file)
@@ -1537,23 +1537,13 @@ static inline void vm_stat_account(struct mm_struct *mm,
 #endif /* CONFIG_PROC_FS */
 
 #ifdef CONFIG_DEBUG_PAGEALLOC
-extern int debug_pagealloc_enabled;
-
 extern void kernel_map_pages(struct page *page, int numpages, int enable);
-
-static inline void enable_debug_pagealloc(void)
-{
-       debug_pagealloc_enabled = 1;
-}
 #ifdef CONFIG_HIBERNATION
 extern bool kernel_page_present(struct page *page);
 #endif /* CONFIG_HIBERNATION */
 #else
 static inline void
 kernel_map_pages(struct page *page, int numpages, int enable) {}
-static inline void enable_debug_pagealloc(void)
-{
-}
 #ifdef CONFIG_HIBERNATION
 static inline bool kernel_page_present(struct page *page) { return true; }
 #endif /* CONFIG_HIBERNATION */
index 217ed23e94875d59ffd7b6a95562fcba36112e08..99c4ba30ba7e46a6c71b3e74ad8fcc59679bd8d7 100644 (file)
@@ -282,10 +282,6 @@ static int __init unknown_bootoption(char *param, char *val)
        return 0;
 }
 
-#ifdef CONFIG_DEBUG_PAGEALLOC
-int __read_mostly debug_pagealloc_enabled = 0;
-#endif
-
 static int __init init_setup(char *str)
 {
        unsigned int i;
@@ -597,7 +593,6 @@ asmlinkage void __init start_kernel(void)
        }
 #endif
        page_cgroup_init();
-       enable_debug_pagealloc();
        debug_objects_mem_init();
        kmemleak_init();
        setup_per_cpu_pageset();
index 7cea557407f40ef96351a91ade5fd3b9cbe915c0..789ff70c8a4ab7f84bb81410d3e3982a7cb3f987 100644 (file)
@@ -95,9 +95,6 @@ static void unpoison_pages(struct page *page, int n)
 
 void kernel_map_pages(struct page *page, int numpages, int enable)
 {
-       if (!debug_pagealloc_enabled)
-               return;
-
        if (enable)
                unpoison_pages(page, numpages);
        else
This page took 0.034803 seconds and 5 git commands to generate.