Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1463363
| From | js1304@gmail.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 2/6] mm/debug_pagealloc: don't allocate page_ext if we don't use guard page |
| Date | 2016-08-16 05:00 +0200 |
| Message-ID | <s6CLD-5JI-11@gated-at.bofh.it> (permalink) |
| References | <s6CLD-5JI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
What debug_pagealloc does is just mapping/unmapping page table.
Basically, it doesn't need additional memory space to memorize something.
But, with guard page feature, it requires additional memory to distinguish
if the page is for guard or not. Guard page is only used when
debug_guardpage_minorder is non-zero so this patch removes additional
memory allocation (page_ext) if debug_guardpage_minorder is zero.
It saves memory if we just use debug_pagealloc and not guard page.
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
mm/page_alloc.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5e7944b..45cb021 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -608,6 +608,9 @@ static bool need_debug_guardpage(void)
if (!debug_pagealloc_enabled())
return false;
+ if (!debug_guardpage_minorder())
+ return false;
+
return true;
}
@@ -616,6 +619,9 @@ static void init_debug_guardpage(void)
if (!debug_pagealloc_enabled())
return;
+ if (!debug_guardpage_minorder())
+ return;
+
_debug_guardpage_enabled = true;
}
@@ -636,7 +642,7 @@ static int __init debug_guardpage_minorder_setup(char *buf)
pr_info("Setting debug_guardpage_minorder to %lu\n", res);
return 0;
}
-__setup("debug_guardpage_minorder=", debug_guardpage_minorder_setup);
+early_param("debug_guardpage_minorder", debug_guardpage_minorder_setup);
static inline bool set_page_guard(struct zone *zone, struct page *page,
unsigned int order, int migratetype)
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/6] Reduce memory waste by page extension user js1304@gmail.com - 2016-08-16 05:00 +0200
[PATCH v2 2/6] mm/debug_pagealloc: don't allocate page_ext if we don't use guard page js1304@gmail.com - 2016-08-16 05:00 +0200
[PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user js1304@gmail.com - 2016-08-16 05:00 +0200
Re: [PATCH v2 5/6] mm/page_ext: support extra space allocation by page_ext user Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 09:30 +0200
[PATCH v2 4/6] mm/page_ext: rename offset to index js1304@gmail.com - 2016-08-16 05:00 +0200
Re: [PATCH v2 4/6] mm/page_ext: rename offset to index Vlastimil Babka <vbabka@suse.cz> - 2016-08-16 09:30 +0200
[PATCH v2 1/6] mm/debug_pagealloc: clean-up guard page handling code js1304@gmail.com - 2016-08-16 05:00 +0200
[PATCH v2 3/6] mm/page_owner: move page_owner specific function to page_owner.c js1304@gmail.com - 2016-08-16 05:00 +0200
Re: [PATCH v2 0/6] Reduce memory waste by page extension user Michal Hocko <mhocko@kernel.org> - 2016-08-16 12:00 +0200
Re: [PATCH v2 0/6] Reduce memory waste by page extension user Michal Hocko <mhocko@kernel.org> - 2016-08-16 12:20 +0200
csiph-web