BACKPORT: FROMGIT: mm: vmstat: add cma statistics
Since CMA is used more widely, it's worth to have CMA allocation
statistics into vmstat. With it, we could know how agressively system
uses cma allocation and how often it fails.
Link: https://lkml.kernel.org/r/20210302183346.3707237-1-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Cc: John Dias <joaodias@google.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Bug: 181887812
Signed-off-by: Minchan Kim <minchan@google.com>
(cherry picked from https://lore.kernel.org/mm-commits/20210302232736.Dy5dxmWpK%25akpm@linux-foundation.org/)
[minchan: Resolved minor bailout path in mm/cma.c ]
Change-Id: Ib5a8cfd0944689e84c8bbf136d215981e956b82f
diff --git a/mm/vmstat.c b/mm/vmstat.c
index ceb66e9..9329286 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1296,6 +1296,10 @@ const char * const vmstat_text[] = {
"htlb_buddy_alloc_success",
"htlb_buddy_alloc_fail",
#endif
+#ifdef CONFIG_CMA
+ "cma_alloc_success",
+ "cma_alloc_fail",
+#endif
"unevictable_pgs_culled",
"unevictable_pgs_scanned",
"unevictable_pgs_rescued",