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>
This commit is contained in:
Dmitry Skiba
2024-09-18 22:16:12 +00:00
parent 532fad0092
commit b3a2458fc6
3 changed files with 5 additions and 0 deletions

View File

@@ -378,6 +378,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_may_oom_exit);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmscan_kswapd_done);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_compaction_begin);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_compaction_end);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_kcompactd_cpu_online);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_bus_iommu_probe);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rmqueue);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_resume_begin);

View File

@@ -145,6 +145,9 @@ DECLARE_HOOK(android_vh_mm_compaction_begin,
DECLARE_HOOK(android_vh_mm_compaction_end,
TP_PROTO(struct compact_control *cc, long vendor_ret),
TP_ARGS(cc, vendor_ret));
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

@@ -3070,6 +3070,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;
}