mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
ANDROID: mm: Add vendor hooks for recording when kswapd finishing the reclaim job
To monitor the reclaiming ability of kswapd, add vendor hook recording when the kswapd finish the reclaiming job and the reclaim progress. android_vh_vmscan_kswpad_done(int, unsigned int, unsigned int, unsigned int) Bug: 301044280 Change-Id: Id6e0a97003f0a156cff4d0996bc38bcd89b1dc69 Signed-off-by: John Hsu <john.hsu@mediatek.com>
This commit is contained in:
@@ -340,3 +340,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_compaction_try_to_compact_pages_exit);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_direct_reclaim_enter);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_direct_reclaim_exit);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_alloc_pages_may_oom_exit);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmscan_kswapd_done);
|
||||
|
||||
@@ -49,6 +49,10 @@ DECLARE_HOOK(android_vh_tune_swappiness,
|
||||
DECLARE_HOOK(android_vh_scan_abort_check_wmarks,
|
||||
TP_PROTO(bool *check_wmarks),
|
||||
TP_ARGS(check_wmarks));
|
||||
DECLARE_HOOK(android_vh_vmscan_kswapd_done,
|
||||
TP_PROTO(int node_id, unsigned int highest_zoneidx, unsigned int alloc_order,
|
||||
unsigned int reclaim_order),
|
||||
TP_ARGS(node_id, highest_zoneidx, alloc_order, reclaim_order));
|
||||
#endif /* _TRACE_HOOK_VMSCAN_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
@@ -7788,6 +7788,8 @@ kswapd_try_sleep:
|
||||
alloc_order);
|
||||
reclaim_order = balance_pgdat(pgdat, alloc_order,
|
||||
highest_zoneidx);
|
||||
trace_android_vh_vmscan_kswapd_done(pgdat->node_id, highest_zoneidx,
|
||||
alloc_order, reclaim_order);
|
||||
if (reclaim_order < alloc_order)
|
||||
goto kswapd_try_sleep;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user