diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 11b759a47ae5..c53270805362 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -282,3 +282,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_tune_inactive_ratio); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_topology_flags_workfn); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_of_i2c_get_board_info); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_attach); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mm_dirty_limits); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 7a17a8440f8b..f4b839f69790 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -71,6 +71,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)); +struct dirty_throttle_control; +DECLARE_HOOK(android_vh_mm_dirty_limits, + TP_PROTO(struct dirty_throttle_control *const gdtc, bool strictlimit, + unsigned long dirty, unsigned long bg_thresh, + unsigned long nr_reclaimable, unsigned long pages_dirtied), + TP_ARGS(gdtc, strictlimit, dirty, bg_thresh, + nr_reclaimable, pages_dirtied)); /* macro versions of hooks are no longer required */ #endif /* _TRACE_HOOK_MM_H */ diff --git a/mm/page-writeback.c b/mm/page-writeback.c index eb34d204d4ee..3c77e6ffd809 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -42,6 +42,9 @@ #include "internal.h" +#undef CREATE_TRACE_POINT +#include + /* * Sleep at most 200ms at a time in balance_dirty_pages(). */ @@ -1625,6 +1628,9 @@ static void balance_dirty_pages(struct bdi_writeback *wb, } } + trace_android_vh_mm_dirty_limits(gdtc, strictlimit, dirty, bg_thresh, + nr_reclaimable, pages_dirtied); + /* * Throttle it only when the background writeback cannot * catch-up. This avoids (excessively) small writeouts