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:
yipeng xiang <yipengxiang@honor.corp-partner.google.com>
Loading
Please sign in to comment