mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo
Subsystems (3)
PATCH 1/1 mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo
Yongqin reported that /proc/zoneinfo format is broken in 4.14 due to commit 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
Node 0, zone DMA
per-node stats
nr_inactive_anon 403
nr_active_anon 89123
nr_inactive_file 128887
nr_active_file 47377
nr_unevictable 2053
nr_slab_reclaimable 7510
nr_slab_unreclaimable 10775
nr_isolated_anon 0
nr_isolated_file 0
<...>
nr_vmscan_write 0
nr_vmscan_immediate_reclaim 0
nr_dirtied 6022
nr_written 5985
74240
^^^^^^^^^^pages free 131656
The problem is caused by the nr_indirectly_reclaimable counter, which is hidden from the /proc/vmstat, but not from the /proc/zoneinfo. Let's fix this inconsistency and hide the counter from /proc/zoneinfo exactly as from /proc/vmstat.
BTW, in 4.19+ the counter has been renamed and exported by the commit b29940c1abd7 ("mm: rename and change semantics of nr_indirectly_reclaimable_bytes"), so there is no such a problem anymore.
--- mm/vmstat.c | 4 ++++ 1 file changed, 4 insertions(+)
mm/vmstat.c +4 -0
@@ -1500,6 +1500,10 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,if (is_zone_first_populated (pgdat, zone)) {seq_printf (m,"\n per-node stats" );for (i =0 ; i <NR_VM_NODE_STAT_ITEMS ; i++) { +/* Skip hidden vmstat items. */ +if (*vmstat_text[i +NR_VM_ZONE_STAT_ITEMS + +NR_VM_NUMA_STAT_ITEMS ] =='\0' ) +continue ; seq_printf(m, "\n %-12s %lu", vmstat_text[i + NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS],
Signature · 1 line
2.17.2
Quoted 22 lines · Roman Gushchin
Yongqin reported that
/proc/zoneinfoformat is broken in 4.14 due to commit7aaf77272358("mm: don't shownr_indirectly_reclaimablein/proc/vmstat")Node 0, zone DMA
per-node statsnr_inactive_anon 403 nr_active_anon 89123 nr_inactive_file 128887 nr_active_file 47377 nr_unevictable 2053 nr_slab_reclaimable 7510 nr_slab_unreclaimable 10775 nr_isolated_anon 0 nr_isolated_file 0 <...> nr_vmscan_write 0 nr_vmscan_immediate_reclaim 0 nr_dirtied 6022 nr_written 5985 74240 ^^^^^^^^^^
Quoted 6 lines
pages free 131656
The problem is caused by the
nr_indirectly_reclaimablecounter, which is hidden from the/proc/vmstat, but not from the/proc/zoneinfo. Let's fix this inconsistency and hide the counter from/proc/zoneinfoexactly as from/proc/vmstat.
Ooops, good catch.
Quoted 4 lines
BTW, in 4.19+ the counter has been renamed and exported by the commit
b29940c1abd7("mm: rename and change semantics ofnr_indirectly_reclaimable_bytes"), so there is no such a problem anymore.
Yeah and that commit depends on introducing a new set kmalloc reclaimable caches, which is definitely not a stable material, so a stable-only patch seems to be the only option.
Quoted 6 lines
Cc <[email protected]> # 4.14.x-4.18.xFixes 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")Reported-by Yongqin Liu <[email protected]>Signed-off-by Roman Gushchin <[email protected]>Cc Vlastimil Babka <[email protected]>Cc Andrew Morton <[email protected]>
Quoted 20 lines
--- mm/vmstat.c | 4 ++++ 1 file changed, 4 insertions(+)mm/vmstat.c +4
-0@@ -1500,6 +1500,10 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,if (is_zone_first_populated (pgdat, zone)) {seq_printf (m,"\n per-node stats" );for (i =0 ; i <NR_VM_NODE_STAT_ITEMS ; i++) { +/* Skip hidden vmstat items. */ +if (*vmstat_text[i +NR_VM_ZONE_STAT_ITEMS + +NR_VM_NUMA_STAT_ITEMS ] =='\0' ) +continue ; seq_printf(m, "\n %-12s %lu", vmstat_text[i + NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS],
Greg KH
maintainerQuoted 62 lines · Roman Gushchin
Yongqin reported that
/proc/zoneinfoformat is broken in 4.14 due to commit7aaf77272358("mm: don't shownr_indirectly_reclaimablein/proc/vmstat")Node 0, zone DMA
per-node statsnr_inactive_anon 403 nr_active_anon 89123 nr_inactive_file 128887 nr_active_file 47377 nr_unevictable 2053 nr_slab_reclaimable 7510 nr_slab_unreclaimable 10775 nr_isolated_anon 0 nr_isolated_file 0 <...> nr_vmscan_write 0 nr_vmscan_immediate_reclaim 0 nr_dirtied 6022 nr_written 5985 74240 ^^^^^^^^^^pages free 131656
The problem is caused by the
nr_indirectly_reclaimablecounter, which is hidden from the/proc/vmstat, but not from the/proc/zoneinfo. Let's fix this inconsistency and hide the counter from/proc/zoneinfoexactly as from/proc/vmstat.BTW, in 4.19+ the counter has been renamed and exported by the commit
b29940c1abd7("mm: rename and change semantics ofnr_indirectly_reclaimable_bytes"), so there is no such a problem anymore.Cc <[email protected]> # 4.14.x-4.18.xFixes 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")Reported-by Yongqin Liu <[email protected]>Signed-off-by Roman Gushchin <[email protected]>Cc Vlastimil Babka <[email protected]>Cc Andrew Morton <[email protected]>--- mm/vmstat.c | 4 ++++ 1 file changed, 4 insertions(+)mm/vmstat.c +4
-0@@ -1500,6 +1500,10 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,if (is_zone_first_populated (pgdat, zone)) {seq_printf (m,"\n per-node stats" );for (i =0 ; i <NR_VM_NODE_STAT_ITEMS ; i++) { +/* Skip hidden vmstat items. */ +if (*vmstat_text[i +NR_VM_ZONE_STAT_ITEMS + +NR_VM_NUMA_STAT_ITEMS ] =='\0' ) +continue ; seq_printf(m, "\n %-12s %lu", vmstat_text[i + NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS],Signature · 1 line
2.17.2
I do not see this patch in Linus's tree, do you?
If not, what am I supposed to do with this?
confused,
greg k-h
Quoted 8 lines · Greg KH
Quoted 7 lines · Roman Gushchin
BTW, in 4.19+ the counter has been renamed and exported by the commit
b29940c1abd7("mm: rename and change semantics ofnr_indirectly_reclaimable_bytes"), so there is no such a problem anymore.Cc <[email protected]> # 4.14.x-4.18.xFixes 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
...
Quoted 3 lines
I do not see this patch in Linus's tree, do you?
If not, what am I supposed to do with this?
Yeah it wasn't probably clear enough, but this is stable-only patch, as upstream avoided the (then-unknown) problem in 4.19 as part of a far more intrusive series. As I've said in my previous reply to this thread, I don't think we can backport that series to stable (e.g. it introduces a set of new kmalloc caches that will suddenly appear in /proc/slabinfo) so I think this is a case for exception from the stable rules.
Vlastimil
Quoted 4 lines
confused,
greg k-h
Greg KH
maintainerQuoted 14 lines · Vlastimil Babka
Quoted 8 lines · Greg KH
Quoted 7 lines · Roman Gushchin
BTW, in 4.19+ the counter has been renamed and exported by the commit
b29940c1abd7("mm: rename and change semantics ofnr_indirectly_reclaimable_bytes"), so there is no such a problem anymore.Cc <[email protected]> # 4.14.x-4.18.xFixes 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")...
Quoted 2 lines
I do not see this patch in Linus's tree, do you?
Quoted 8 lines
Quoted 1 line
If not, what am I supposed to do with this?
Yeah it wasn't probably clear enough, but this is stable-only patch, as upstream avoided the (then-unknown) problem in 4.19 as part of a far more intrusive series. As I've said in my previous reply to this thread, I don't think we can backport that series to stable (e.g. it introduces a set of new kmalloc caches that will suddenly appear in
/proc/slabinfo) so I think this is a case for exception from the stable rules.
Ok, now queued up, thanks.
greg k-h
Patch "mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo" has been added to the 4.14-stable tree
In reply to Roman GushchinThis is a note to let you know that I've just added the patch titled
mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mm-hide-incomplete-nr_indirectly_reclaimable-in-proc-zoneinfo.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From [email protected] Thu Dec 6 12:12:35 2018
From: Roman Gushchin <[email protected]>
Date: Tue, 30 Oct 2018 17:48:25 +0000
Subject: mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo
To: "[email protected]" <[email protected]>
Cc: Yongqin Liu <[email protected]>, "[email protected]" <[email protected]>, "[email protected]" <[email protected]>, Kernel Team <[email protected]>, "Roman Gushchin" <[email protected]>, Vlastimil Babka <[email protected]>, Andrew Morton <[email protected]>
Message-ID: <[email protected]>
From: Roman Gushchin <[email protected]>
[fixed differently upstream, this is a work-around to resolve it for 4.14.y]
Yongqin reported that /proc/zoneinfo format is broken in 4.14 due to commit 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat")
Node 0, zone DMA
per-node stats
nr_inactive_anon 403
nr_active_anon 89123
nr_inactive_file 128887
nr_active_file 47377
nr_unevictable 2053
nr_slab_reclaimable 7510
nr_slab_unreclaimable 10775
nr_isolated_anon 0
nr_isolated_file 0
<...>
nr_vmscan_write 0
nr_vmscan_immediate_reclaim 0
nr_dirtied 6022
nr_written 5985
74240
^^^^^^^^^^pages free 131656
The problem is caused by the nr_indirectly_reclaimable counter, which is hidden from the /proc/vmstat, but not from the /proc/zoneinfo. Let's fix this inconsistency and hide the counter from /proc/zoneinfo exactly as from /proc/vmstat.
BTW, in 4.19+ the counter has been renamed and exported by the commit b29940c1abd7 ("mm: rename and change semantics of nr_indirectly_reclaimable_bytes"), so there is no such a problem anymore.
--- mm/vmstat.c | 4 ++++ 1 file changed, 4 insertions(+)
mm/vmstat.c +4 -0
@@ -1500,6 +1500,10 @@ static void zoneinfo_show_print(struct sif (is_zone_first_populated (pgdat, zone)) {seq_printf (m,"\n per-node stats" );for (i =0 ; i <NR_VM_NODE_STAT_ITEMS ; i++) { +/* Skip hidden vmstat items. */ +if (*vmstat_text[i +NR_VM_ZONE_STAT_ITEMS + +NR_VM_NUMA_STAT_ITEMS ] =='\0' ) +continue ; seq_printf(m, "\n %-12s %lu", vmstat_text[i + NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS],
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/mm-hide-incomplete-nr_indirectly_reclaimable-in-proc-zoneinfo.patch