mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n [Linux 3.16.72]

This Linux kernel change "mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n" is included in the Linux 3.16.72 release. This change is authored by Konstantin Khlebnikov <khlebnikov [at]> on Thu Apr 18 17:50:20 2019 -0700. The commit for this change in Linux stable tree is 4c55614 (patch) which is from upstream commit e8277b3. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream e8277b3.

mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n

commit e8277b3b52240ec1caad8e6df278863e4bf42eac upstream.

Commit 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
depends on skipping vmstat entries with empty name introduced in
7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in
/proc/vmstat") but reverted in b29940c1abd7 ("mm: rename and change
semantics of nr_indirectly_reclaimable_bytes").

So skipping no longer works and /proc/vmstat has misformatted lines " 0".

This patch simply shows debug counters "nr_tlb_remote_*" for UP.

Link:[email protected]
Fixes: 58bc4c34d249 ("mm/vmstat.c: skip NR_TLB_REMOTE_FLUSH* properly")
Signed-off-by: Konstantin Khlebnikov <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Cc: Roman Gushchin <[email protected]>
Cc: Jann Horn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>

There are 5 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 mm/vmstat.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/mm/vmstat.c b/mm/vmstat.c
index ae3c911..8272a99 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -861,13 +861,8 @@ static void walk_zones_in_node(struct seq_file *m, pg_data_t *pgdat,
-#ifdef CONFIG_SMP
-   "", /* nr_tlb_remote_flush */
-   "", /* nr_tlb_remote_flush_received */
-#endif /* CONFIG_SMP */

Leave a Reply

Your email address will not be published. Required fields are marked *