Skip to content

Commit

Permalink
profile: Suppress warning about large allocations when profile=1 is s…
Browse files Browse the repository at this point in the history
…pecified

When profile= is used, a large buffer is allocated early at
boot. This can be larger than what the page allocator can
provide so it prints a warning. However, the caller is able to
handle the situation so this patch suppresses the warning.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>
Cc: Heinz Diehl <htd@fancy-poultry.org>
Cc: David Miller <davem@davemloft.net>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <1247656992-19846-3-git-send-email-mel@csn.ul.ie>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Mel Gorman authored and Ingo Molnar committed Jul 18, 2009
1 parent 78af08d commit e5d490b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ int __ref profile_init(void)

cpumask_copy(prof_cpu_mask, cpu_possible_mask);

prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL);
prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL|__GFP_NOWARN);
if (prof_buffer)
return 0;

prof_buffer = alloc_pages_exact(buffer_bytes, GFP_KERNEL|__GFP_ZERO);
prof_buffer = alloc_pages_exact(buffer_bytes,
GFP_KERNEL|__GFP_ZERO|__GFP_NOWARN);
if (prof_buffer)
return 0;

Expand Down

0 comments on commit e5d490b

Please sign in to comment.