Commit 54c29c635ae91f5d75ced7bffeaa77ba37ca02bb
Committed by
Ingo Molnar
1 parent
855c743a27
Exists in
master
and in
38 other branches
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 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>
Showing 4 changed files with 0 additions and 24 deletions Side-by-side Diff
arch/x86/mm/pageattr.c
... | ... | @@ -1334,12 +1334,6 @@ |
1334 | 1334 | } |
1335 | 1335 | |
1336 | 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 | - | |
1342 | - /* | |
1343 | 1337 | * The return value is ignored as the calls cannot fail. |
1344 | 1338 | * Large pages for identity mappings are not used at boot time |
1345 | 1339 | * and hence no memory allocations during large page split. |
include/linux/mm.h
... | ... | @@ -1537,23 +1537,13 @@ |
1537 | 1537 | #endif /* CONFIG_PROC_FS */ |
1538 | 1538 | |
1539 | 1539 | #ifdef CONFIG_DEBUG_PAGEALLOC |
1540 | -extern int debug_pagealloc_enabled; | |
1541 | - | |
1542 | 1540 | 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 | -} | |
1548 | 1541 | #ifdef CONFIG_HIBERNATION |
1549 | 1542 | extern bool kernel_page_present(struct page *page); |
1550 | 1543 | #endif /* CONFIG_HIBERNATION */ |
1551 | 1544 | #else |
1552 | 1545 | static inline void |
1553 | 1546 | kernel_map_pages(struct page *page, int numpages, int enable) {} |
1554 | -static inline void enable_debug_pagealloc(void) | |
1555 | -{ | |
1556 | -} | |
1557 | 1547 | #ifdef CONFIG_HIBERNATION |
1558 | 1548 | static inline bool kernel_page_present(struct page *page) { return true; } |
1559 | 1549 | #endif /* CONFIG_HIBERNATION */ |
init/main.c
... | ... | @@ -282,10 +282,6 @@ |
282 | 282 | return 0; |
283 | 283 | } |
284 | 284 | |
285 | -#ifdef CONFIG_DEBUG_PAGEALLOC | |
286 | -int __read_mostly debug_pagealloc_enabled = 0; | |
287 | -#endif | |
288 | - | |
289 | 285 | static int __init init_setup(char *str) |
290 | 286 | { |
291 | 287 | unsigned int i; |
... | ... | @@ -597,7 +593,6 @@ |
597 | 593 | } |
598 | 594 | #endif |
599 | 595 | page_cgroup_init(); |
600 | - enable_debug_pagealloc(); | |
601 | 596 | debug_objects_mem_init(); |
602 | 597 | kmemleak_init(); |
603 | 598 | setup_per_cpu_pageset(); |