Skip to content

Commit 54c29c6

Browse files
Stanislaw GruszkaIngo Molnar
Stanislaw Gruszka
authored and
Ingo Molnar
committed
mm, x86: Remove debug_pagealloc_enabled
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 <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>
1 parent 855c743 commit 54c29c6

File tree

4 files changed

+0
-24
lines changed

4 files changed

+0
-24
lines changed

arch/x86/mm/pageattr.c

-6
Original file line numberDiff line numberDiff line change
@@ -1333,12 +1333,6 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
13331333
numpages * PAGE_SIZE);
13341334
}
13351335

1336-
/*
1337-
* If page allocator is not up yet then do not call c_p_a():
1338-
*/
1339-
if (!debug_pagealloc_enabled)
1340-
return;
1341-
13421336
/*
13431337
* The return value is ignored as the calls cannot fail.
13441338
* Large pages for identity mappings are not used at boot time

include/linux/mm.h

-10
Original file line numberDiff line numberDiff line change
@@ -1537,23 +1537,13 @@ static inline void vm_stat_account(struct mm_struct *mm,
15371537
#endif /* CONFIG_PROC_FS */
15381538

15391539
#ifdef CONFIG_DEBUG_PAGEALLOC
1540-
extern int debug_pagealloc_enabled;
1541-
15421540
extern void kernel_map_pages(struct page *page, int numpages, int enable);
1543-
1544-
static inline void enable_debug_pagealloc(void)
1545-
{
1546-
debug_pagealloc_enabled = 1;
1547-
}
15481541
#ifdef CONFIG_HIBERNATION
15491542
extern bool kernel_page_present(struct page *page);
15501543
#endif /* CONFIG_HIBERNATION */
15511544
#else
15521545
static inline void
15531546
kernel_map_pages(struct page *page, int numpages, int enable) {}
1554-
static inline void enable_debug_pagealloc(void)
1555-
{
1556-
}
15571547
#ifdef CONFIG_HIBERNATION
15581548
static inline bool kernel_page_present(struct page *page) { return true; }
15591549
#endif /* CONFIG_HIBERNATION */

init/main.c

-5
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,6 @@ static int __init unknown_bootoption(char *param, char *val)
282282
return 0;
283283
}
284284

285-
#ifdef CONFIG_DEBUG_PAGEALLOC
286-
int __read_mostly debug_pagealloc_enabled = 0;
287-
#endif
288-
289285
static int __init init_setup(char *str)
290286
{
291287
unsigned int i;
@@ -597,7 +593,6 @@ asmlinkage void __init start_kernel(void)
597593
}
598594
#endif
599595
page_cgroup_init();
600-
enable_debug_pagealloc();
601596
debug_objects_mem_init();
602597
kmemleak_init();
603598
setup_per_cpu_pageset();

mm/debug-pagealloc.c

-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ static void unpoison_pages(struct page *page, int n)
9595

9696
void kernel_map_pages(struct page *page, int numpages, int enable)
9797
{
98-
if (!debug_pagealloc_enabled)
99-
return;
100-
10198
if (enable)
10299
unpoison_pages(page, numpages);
103100
else

0 commit comments

Comments
 (0)