mm: mm_event supports vmstat
authorMinchan Kim <minchan@google.com>
Tue, 15 Jan 2019 04:54:07 +0000 (13:54 +0900)
committerPDO SCM Team <hudsoncm@motorola.com>
Fri, 15 Nov 2019 06:58:51 +0000 (00:58 -0600)
commitb0859fb60d1424e279d7306dbcb03e222474ac59
tree5e4dabc17e71497384cec73b72d1012093831c7f
parent7a864ad86ca293cff85332c22a2cf1ba066f74e8
mm: mm_event supports vmstat

Vmstat is significantly important to investigate MM problem.
We have solved many problmes with it via asking users to get
vmstat data periodically from the device, which manual way is
painful once we release the device or on hard reproducible
scenario.

This patch adds periodic vmstat dump into mm_event. It works
only if there are some events in compaction or reclaim. Thus,
unless there is memory pressure, it doesn't gather any vmstat
data. Defenderault interval between each dump is 1000ms.
Admin can tweak it via

echo 2000 > /sys/kernel/debug/mm_event/vmstat_period_ms

Mot-CRs-fixed: (CR)

Bug: 80168800
Change-Id: I4c0e7237d7764c4ea79da00952e5de34ccbe4187
Signed-off-by: Minchan Kim <minchan@google.com>
Reviewed-on: https://gerrit.mot.com/1453728
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
include/linux/mm_event.h
include/trace/events/mm_event.h
mm/mm_event.c