ANDROID: mm: add vh for kcompactd_cpu_online()

kcompactd_cpu_online() changes kcompactd cpumask, potentially
overwriting any vendor-specific cpumask that was there. This
hook allows vendors to re-set the cpumask.

Bug: 367400751
Change-Id: I45b92bcd16fbf2d5d76474287db659e32af64201
Signed-off-by: Dmitry Skiba <dskiba@google.com>
(cherry picked from commit b3a2458fc6e6bf265ee52297f6478e4b43725fb2)
Signed-off-by: Jacky Liu <qsliu@google.com>
This commit is contained in:
Dmitry Skiba 2024-09-18 22:16:12 +00:00 committed by Todd Kjos
parent dd7de90d0e
commit 9a46e8ecf7
3 changed files with 5 additions and 0 deletions

View File

@ -382,6 +382,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_compaction_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_compaction_try_to_compact_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_direct_reclaim_enter);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_direct_reclaim_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_kcompactd_cpu_online);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_may_oom_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmscan_kswapd_done);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_shrink_folio_list);

View File

@ -76,6 +76,9 @@ DECLARE_HOOK(android_vh_look_around,
TP_PROTO(struct page_vma_mapped_walk *pvmw, struct folio *folio,
struct vm_area_struct *vma, int *referenced),
TP_ARGS(pvmw, folio, vma, referenced));
DECLARE_HOOK(android_vh_mm_kcompactd_cpu_online,
TP_PROTO(int cpu),
TP_ARGS(cpu));
DECLARE_HOOK(android_vh_free_unref_page_bypass,
TP_PROTO(struct page *page, int order, int migratetype, bool *bypass),
TP_ARGS(page, order, migratetype, bypass));

View File

@ -3247,6 +3247,7 @@ static int kcompactd_cpu_online(unsigned int cpu)
if (pgdat->kcompactd)
set_cpus_allowed_ptr(pgdat->kcompactd, mask);
}
trace_android_vh_mm_kcompactd_cpu_online(cpu);
return 0;
}