diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memcontrol.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b8c1e5acc25..af28e128b74 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1816,6 +1816,36 @@ static int mem_control_stat_show(struct cgroup *cont, struct cftype *cft, | |||
1816 | cb->fill(cb, "unevictable", unevictable * PAGE_SIZE); | 1816 | cb->fill(cb, "unevictable", unevictable * PAGE_SIZE); |
1817 | 1817 | ||
1818 | } | 1818 | } |
1819 | |||
1820 | #ifdef CONFIG_DEBUG_VM | ||
1821 | cb->fill(cb, "inactive_ratio", mem_cont->inactive_ratio); | ||
1822 | |||
1823 | { | ||
1824 | int nid, zid; | ||
1825 | struct mem_cgroup_per_zone *mz; | ||
1826 | unsigned long recent_rotated[2] = {0, 0}; | ||
1827 | unsigned long recent_scanned[2] = {0, 0}; | ||
1828 | |||
1829 | for_each_online_node(nid) | ||
1830 | for (zid = 0; zid < MAX_NR_ZONES; zid++) { | ||
1831 | mz = mem_cgroup_zoneinfo(mem_cont, nid, zid); | ||
1832 | |||
1833 | recent_rotated[0] += | ||
1834 | mz->reclaim_stat.recent_rotated[0]; | ||
1835 | recent_rotated[1] += | ||
1836 | mz->reclaim_stat.recent_rotated[1]; | ||
1837 | recent_scanned[0] += | ||
1838 | mz->reclaim_stat.recent_scanned[0]; | ||
1839 | recent_scanned[1] += | ||
1840 | mz->reclaim_stat.recent_scanned[1]; | ||
1841 | } | ||
1842 | cb->fill(cb, "recent_rotated_anon", recent_rotated[0]); | ||
1843 | cb->fill(cb, "recent_rotated_file", recent_rotated[1]); | ||
1844 | cb->fill(cb, "recent_scanned_anon", recent_scanned[0]); | ||
1845 | cb->fill(cb, "recent_scanned_file", recent_scanned[1]); | ||
1846 | } | ||
1847 | #endif | ||
1848 | |||
1819 | return 0; | 1849 | return 0; |
1820 | } | 1850 | } |
1821 | 1851 | ||