Skip to content

Commit

Permalink
[PATCH] memory hotplug: __GFP_NOWARN is better for __kmalloc_section_…
Browse files Browse the repository at this point in the history
…memmap()

Add __GFP_NOWARN flag to calling of __alloc_pages() in
__kmalloc_section_memmap().  It can reduce noisy failure message.

In ia64, section size is 1 GB, this means that order 8 pages are necessary
for each section's memmap.  It is often very hard requirement under heavy
memory pressure as you know.  So, __alloc_pages() gives up allocation and
shows many noisy stack traces which means no page for each sections.
(Current my environment shows 32 times of stack trace....)

But, __kmalloc_section_memmap() calls vmalloc() after failure of it, and it
can succeed allocation of memmap.  So, its stack trace warning becomes just
noisy.  I suppose it shouldn't be shown.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed Oct 28, 2006
1 parent 969b755 commit f2d0aa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/sparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static struct page *__kmalloc_section_memmap(unsigned long nr_pages)
struct page *page, *ret;
unsigned long memmap_size = sizeof(struct page) * nr_pages;

page = alloc_pages(GFP_KERNEL, get_order(memmap_size));
page = alloc_pages(GFP_KERNEL|__GFP_NOWARN, get_order(memmap_size));
if (page)
goto got_map_page;

Expand Down

0 comments on commit f2d0aa5

Please sign in to comment.