Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0609612 authored by John Stultz's avatar John Stultz
Browse files

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: default avatarJohn Stultz <john.stultz@linaro.org>
Bug: 177702259
Change-Id: Id4c6f2435afd9e386afba280a7f05f2bab551484
parent 77e911a1
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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;