diff mbox series

[v4,1/3] mm/vmstat: expose min_slab_pages in /proc/zoneinfo

Message ID 1559816080-26405-2-git-send-email-laoar.shao@gmail.com (mailing list archive)
State New, archived
Headers show
Series mm: improvements in shrink slab | expand

Commit Message

Yafang Shao June 6, 2019, 10:14 a.m. UTC
On one of our servers, we find the dentry is continuously growing
without shrinking. We're not sure whether that is because reclaimable
slab is still less than min_slab_pages.
So if we expose min_slab_pages, it would be easy to compare.

As we can set min_slab_ratio with sysctl, we should expose the effective
in_slab_pages to user as well.

That is same with min_unmapped_pages.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
 mm/vmstat.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/mm/vmstat.c b/mm/vmstat.c
index fd7e16c..2e1c608 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1550,7 +1550,15 @@  static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
 				NR_VM_NUMA_STAT_ITEMS],
 				node_page_state(pgdat, i));
 		}
+
+#ifdef CONFIG_NUMA
+		seq_printf(m, "\n      %-12s %lu", "min_slab",
+			   pgdat->min_slab_pages);
+		seq_printf(m, "\n      %-12s %lu", "min_unmapped",
+			   pgdat->min_unmapped_pages);
+#endif
 	}
+
 	seq_printf(m,
 		   "\n  pages free     %lu"
 		   "\n        min      %lu"