ANDROID: ion_system_heap: Add __GFP_NOWARN to mid-order allocations
When testing ION, we often see warnings in dmesg where a mid-order allocation failed. The logic will always fall back to lower-order allocations (there is no strict need to return contiguous pages) so these warnings are distracting noise. To solve this, this patch adds the __GFP_NOWARN flag to all mid-order allocations. Signed-off-by: John Stultz <john.stultz@linaro.org> Bug: 177702259 Change-Id: Id4c6f2435afd9e386afba280a7f05f2bab551484
This commit is contained in:
parent
77e911a101
commit
c060961254
@ -238,6 +238,14 @@ static int ion_system_heap_create_pools(struct ion_page_pool **pools)
|
||||
struct ion_page_pool *pool;
|
||||
gfp_t gfp_flags = low_order_gfp_flags;
|
||||
|
||||
/*
|
||||
* Enable NOWARN on larger order allocations, as
|
||||
* we will fall back to 0-order if things fail.
|
||||
* This avoids warning noise in dmesg.
|
||||
*/
|
||||
if (orders[i] > 0)
|
||||
gfp_flags |= __GFP_NOWARN;
|
||||
|
||||
if (orders[i] > 4)
|
||||
gfp_flags = high_order_gfp_flags;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user