Skip to content

Commit

Permalink
mm, x86: Remove debug_pagealloc_enabled
Browse files Browse the repository at this point in the history
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 12d6f21 "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 <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Stanislaw Gruszka authored and Ingo Molnar committed Dec 6, 2011
1 parent 855c743 commit 54c29c6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 0 additions & 10 deletions include/linux/mm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
5 changes: 0 additions & 5 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down
3 changes: 0 additions & 3 deletions mm/debug-pagealloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54c29c6

Please sign in to comment.