14abb0c187
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 ac26e9c7b809 ("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.
The original commit included a change to set __GFP_CMA in mm/memory.c,
but commit 988dc02 ("BACKPORT: mm: support large folios swap-in for sync
io devices") overwrote this, and __GFP_CMA is not currently set in
android16-6.12, so in the current commit, we decided to keep the status
quo, the missing __GFP_CMA flags will be added in a separate patch.
Bug: 330201547
Bug: 417417101
Change-Id: Idfa6b0b06b1b819d706c847e702bc94ddf7aa55a
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Signed-off-by: Sukadev Bhattiprolu <quic_sukadev@quicinc.com>
(cherry picked from commit 31feff06a014b0241a77c06162831ea027d2946d)
Signed-off-by: ying zuxin <11154159@vivo.com>
16 KiB
16 KiB