This tracepoint gives visibility on how often the flushing of memcg stats occurs, along with the reason for the flush. It can help with understanding how readers are affected by having to perform the flush; the event captures the info on whether the flush was skipped or not. The information collected could help in determining the effectiveness of the background work where the flush is scheduled periodically. Paired with the recently added tracepoints for tracing rstat updates, it can also help show correlation where stats exceed thresholds frequently. Note there is one reason called "zswap" that was included to distinguish one special case where a zswap function makes a direct call to do_flush_stats(). JP Kobryn (2): add memcg flush tracepoint event use memcg flush tracepoint include/trace/events/memcg.h | 56 ++++++++++++++++++++++++++++++++++++ mm/memcontrol.c | 7 ++++- 2 files changed, 62 insertions(+), 1 deletion(-) -- 2.47.0