profile: suppress warning about large allocations when profile=1 is specified
authorMel Gorman <mel@csn.ul.ie>
Wed, 29 Jul 2009 22:04:09 +0000 (15:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 30 Jul 2009 02:10:36 +0000 (19:10 -0700)
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>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/profile.c

index 69911b5745eb1a9fd406e7bf3ef4a653033898a2..419250ebec4d63b913130a2f533cc2adf95f359a 100644 (file)
@@ -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;