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 Bug: 330661608 Bug: 395197442 Change-Id: Id6e0a97003f0a156cff4d0996bc38bcd89b1dc69 Signed-off-by: John Hsu <john.hsu@mediatek.com> Signed-off-by: wengle <wengle@oppo.com>
This commit is contained in:
@@ -407,3 +407,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_wb_dirty_limits);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vfs_fsync_range);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_do_fcntl);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_evict);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_vmscan_kswapd_done);
|
||||
|
||||
@@ -59,6 +59,11 @@ DECLARE_HOOK(android_vh_tune_scan_type,
|
||||
DECLARE_HOOK(android_vh_shrink_slab_bypass,
|
||||
TP_PROTO(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg, int priority, bool *bypass),
|
||||
TP_ARGS(gfp_mask, nid, memcg, priority, bypass));
|
||||
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>
|
||||
|
||||
@@ -7347,6 +7347,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