ANDROID: mm: add vendor hooks in madvise for swap entry

Add vendor hooks in madvise for swap entry
- android_vh_madvise_pageout_swap_entry
- android_vh_madvise_swapin_walk_pmd_entry
- android_vh_process_madvise_end

removed android_vh_madvise_pageout_swap_entry()
renamed android_vh_process_madvise()

Bug: 284059805

Change-Id: Ic389244e343737a583286c20cadb6774efd8890c
Signed-off-by: Sooyong Suk <s.suk@samsung.com>
(cherry picked from commit 7adccac4c2778efee2a6683f360bf7e685931cf4)
This commit is contained in:
Sooyong Suk
2024-04-26 15:00:40 +09:00
committed by Treehugger Robot
parent 1808855fbf
commit 5f63d051ce
3 changed files with 11 additions and 0 deletions
+2
View File
@@ -321,6 +321,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cma_alloc_retry);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_smaps_pte_entry);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_smap);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rebalance_anon_lru_bypass);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_madvise_swapin_walk_pmd_entry);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_process_madvise);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_trigger_vendor_lmk_kill);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_pages_slowpath_start);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_pages_slowpath_end);
+7
View File
@@ -133,6 +133,13 @@ struct slabinfo;
DECLARE_HOOK(android_vh_cache_show,
TP_PROTO(struct seq_file *m, struct slabinfo *sinfo, struct kmem_cache *s),
TP_ARGS(m, sinfo, s));
DECLARE_HOOK(android_vh_madvise_swapin_walk_pmd_entry,
TP_PROTO(swp_entry_t entry),
TP_ARGS(entry));
DECLARE_HOOK(android_vh_process_madvise,
TP_PROTO(int behavior, ssize_t *ret, void *priv),
TP_ARGS(behavior, ret, priv));
DECLARE_HOOK(android_vh_count_workingset_refault,
TP_PROTO(struct folio *folio),
TP_ARGS(folio));
+2
View File
@@ -200,6 +200,7 @@ static int swapin_walk_pmd_entry(pmd_t *pmd, unsigned long start,
pte_unmap_unlock(ptep, ptl);
ptep = NULL;
trace_android_vh_madvise_swapin_walk_pmd_entry(entry);
folio = read_swap_cache_async(entry, GFP_HIGHUSER_MOVABLE,
vma, addr, &splug);
@@ -1580,5 +1581,6 @@ release_task:
free_iov:
kfree(iov);
out:
trace_android_vh_process_madvise(behavior, &ret, NULL);
return ret;
}