Skip to content

Commit b62f495

Browse files
gormanmtorvalds
authored andcommitted
profile: suppress warning about large allocations when profile=1 is specified
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>
1 parent 1fc28b7 commit b62f495

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎kernel/profile.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ int __ref profile_init(void)
117117

118118
cpumask_copy(prof_cpu_mask, cpu_possible_mask);
119119

120-
prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL);
120+
prof_buffer = kzalloc(buffer_bytes, GFP_KERNEL|__GFP_NOWARN);
121121
if (prof_buffer)
122122
return 0;
123123

124-
prof_buffer = alloc_pages_exact(buffer_bytes, GFP_KERNEL|__GFP_ZERO);
124+
prof_buffer = alloc_pages_exact(buffer_bytes,
125+
GFP_KERNEL|__GFP_ZERO|__GFP_NOWARN);
125126
if (prof_buffer)
126127
return 0;
127128

0 commit comments

Comments
 (0)