ANDROID: vendor_hook: Add hooks in free_swap_slot()

Provide a vendor hook to replace the function free_swap_slot,
adding the free_swap_slot process of pages swapped to the
specified swap location(i.e., the reserved expended memory)

Bug: 234214858
Signed-off-by: Bing Han <bing.han@transsion.com>
Change-Id: Idd6d0007e64d56d556d1234a8b931fce06031809
This commit is contained in:
Bing Han
2022-06-10 18:45:31 +08:00
committed by Treehugger Robot
parent d2fea0ba9a
commit 7222a0b29b
3 changed files with 8 additions and 0 deletions

View File

@@ -176,6 +176,9 @@ DECLARE_HOOK(android_vh_count_pswpout,
DECLARE_HOOK(android_vh_count_swpout_vm_event,
TP_PROTO(struct swap_info_struct *sis, struct page *page, bool *skip),
TP_ARGS(sis, page, skip));
DECLARE_HOOK(android_vh_free_swap_slot,
TP_PROTO(swp_entry_t entry, struct swap_slots_cache *cache, bool *skip),
TP_ARGS(entry, cache, skip));
DECLARE_HOOK(android_vh_page_isolated_for_reclaim,
TP_PROTO(struct mm_struct *mm, struct page *page),
TP_ARGS(mm, page));