ANDROID: vendor_hooks: Allow shared pages reclaim via MADV_PAGEOUT

Add a hook in madvise_cold_or_pageout_pte_range() to allow
vendor modules to influence the shared pages reclaim.

Bug: 242678506
Change-Id: I269a385b59f7291c2e96478674bb3d05f94584cb
Signed-off-by: Pavankumar Kondeti <quic_pkondeti@quicinc.com>
This commit is contained in:
Pavankumar Kondeti
2022-09-26 18:36:10 +05:30
parent 2d8afda40e
commit 6d04d8ce90
3 changed files with 7 additions and 1 deletions

View File

@@ -237,6 +237,9 @@ DECLARE_HOOK(android_vh_get_swap_page,
TP_PROTO(struct page *page, swp_entry_t *entry,
struct swap_slots_cache *cache, bool *found),
TP_ARGS(page, entry, cache, found));
DECLARE_HOOK(android_vh_madvise_cold_or_pageout,
TP_PROTO(struct vm_area_struct *vma, bool *allow_shared),
TP_ARGS(vma, allow_shared));
DECLARE_HOOK(android_vh_page_isolated_for_reclaim,
TP_PROTO(struct mm_struct *mm, struct page *page),
TP_ARGS(mm, page));