diff options
author | Vlastimil Babka <vbabka@suse.cz> | 2018-10-26 18:05:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-10-26 19:26:32 -0400 |
commit | b29940c1abd7a4c3abeb926df0a5ec84d6902d47 (patch) | |
tree | 66fc77981adf0ad7ac1ca34c97150ad6585d974f /mm/vmstat.c | |
parent | 2e03b4bc4ae84fcc0eee00e5ba5d228901d38809 (diff) |
mm: rename and change semantics of nr_indirectly_reclaimable_bytes
The vmstat counter NR_INDIRECTLY_RECLAIMABLE_BYTES was introduced by
commit eb59254608bc ("mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES") with
the goal of accounting objects that can be reclaimed, but cannot be
allocated via a SLAB_RECLAIM_ACCOUNT cache. This is now possible via
kmalloc() with __GFP_RECLAIMABLE flag, and the dcache external names user
is converted.
The counter is however still useful for accounting direct page allocations
(i.e. not slab) with a shrinker, such as the ION page pool. So keep it,
and:
- change granularity to pages to be more like other counters; sub-page
allocations should be able to use kmalloc
- rename the counter to NR_KERNEL_MISC_RECLAIMABLE
- expose the counter again in vmstat as "nr_kernel_misc_reclaimable"; we can
again remove the check for not printing "hidden" counters
Link: http://lkml.kernel.org/r/20180731090649.16028-5-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: Roman Gushchin <guro@fb.com>
Cc: Vijayanand Jitta <vjitta@codeaurora.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index 7878da76abf2..2cec2fa4c8ae 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c | |||
@@ -1161,7 +1161,7 @@ const char * const vmstat_text[] = { | |||
1161 | "nr_vmscan_immediate_reclaim", | 1161 | "nr_vmscan_immediate_reclaim", |
1162 | "nr_dirtied", | 1162 | "nr_dirtied", |
1163 | "nr_written", | 1163 | "nr_written", |
1164 | "", /* nr_indirectly_reclaimable */ | 1164 | "nr_kernel_misc_reclaimable", |
1165 | 1165 | ||
1166 | /* enum writeback_stat_item counters */ | 1166 | /* enum writeback_stat_item counters */ |
1167 | "nr_dirty_threshold", | 1167 | "nr_dirty_threshold", |
@@ -1706,10 +1706,6 @@ static int vmstat_show(struct seq_file *m, void *arg) | |||
1706 | unsigned long *l = arg; | 1706 | unsigned long *l = arg; |
1707 | unsigned long off = l - (unsigned long *)m->private; | 1707 | unsigned long off = l - (unsigned long *)m->private; |
1708 | 1708 | ||
1709 | /* Skip hidden vmstat items. */ | ||
1710 | if (*vmstat_text[off] == '\0') | ||
1711 | return 0; | ||
1712 | |||
1713 | seq_puts(m, vmstat_text[off]); | 1709 | seq_puts(m, vmstat_text[off]); |
1714 | seq_put_decimal_ull(m, " ", *l); | 1710 | seq_put_decimal_ull(m, " ", *l); |
1715 | seq_putc(m, '\n'); | 1711 | seq_putc(m, '\n'); |