Commit 41055485 authored by yipeng xiang's avatar yipeng xiang
Browse files

ANDROID: mm: add vendor_hook for mglru shrink



We want to perform a certain amount of reclaim operations on a non-root memcg, but in should_abort_scan,
the condition !root_reclaim(sc) causes unnecessary loop retries even if the nr_to_reclaim condition is met.
The call stack is as follows:
shrink_zones
shrink_node
shrink_node_memcgs
shrink_lruvec
lru_gen_shrink_lruvec
try_to_shrink_lruvec
should_abort_scan
if (!root_reclaim(sc))
	retry once more

The hook function: trace_android_vh_mglru_should_abort_scan is added to identify the intent to reclaim a specific memcg
and bypass the !root_reclaim(sc) condition.

Bug: 365008739
Change-Id: I297986dde2bf8ffe937cff3ffc814da92067029a
Signed-off-by: default avataryipeng xiang <yipengxiang@honor.corp-partner.google.com>
parent c0e21888
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment