Commit 31feff06 authored by Chris Goldsworthy's avatar Chris Goldsworthy Committed by Carlos Llamas
Browse files

ANDROID: mm: Create hooks for ZONE_MOVABLE allocs



Create a vendor hook inside of gfp_zone() to modify which allocations
get to enter ZONE_MOVABLE, by zeroing out __GFP_HIGHMEM inside of the
trace hook based on certain conditions.

Separately, create a trace hook in the readahead path to affect the
behavior of the tracehook in gfp_zone().

In 5.15, we had set_skip_swapcache_flags trace-hook in do_swap_page()
but commit ac26e9c7 ("ANDROID: cma: allow to use CMA in swap-in path")
added __GFP_CMA explicitly, so the set_skip_swapcache_flags trace hook
is no longer needed.

Note:	To comply with vendor hook guidlines, avoid including types.h in
	trace/hooks/mm.h and use unsigned int for gfp_t.

Bug: 330201547
Change-Id: Idfa6b0b06b1b819d706c847e702bc94ddf7aa55a
Signed-off-by: default avatarChris Goldsworthy <cgoldswo@codeaurora.org>
Signed-off-by: default avatarSukadev Bhattiprolu <quic_sukadev@quicinc.com>
parent 104c34d6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment