Skip to content

Commit a8a4b7a

Browse files
Baoquan Hetorvalds
authored andcommitted
Revert "mm/vmstat.c: do not show lowmem reserve protection information of empty zone"
This reverts commit 26e7dea. Sonny reported that one of their tests started failing on the latest kernel on their Chrome OS platform. The root cause is that the above commit removed the protection line of empty zone, while the parser used in the test relies on the protection line to mark the end of each zone. Let's revert it to avoid breaking userspace testing or applications. Fixes: 26e7dea ("mm/vmstat.c: do not show lowmem reserve protection information of empty zone)" Reported-by: Sonny Rao <[email protected]> Signed-off-by: Baoquan He <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Acked-by: David Rientjes <[email protected]> Cc: <[email protected]> [5.8.x] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9922c1d commit a8a4b7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mm/vmstat.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,19 +1642,19 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
16421642
zone->present_pages,
16431643
zone_managed_pages(zone));
16441644

1645-
/* If unpopulated, no other information is useful */
1646-
if (!populated_zone(zone)) {
1647-
seq_putc(m, '\n');
1648-
return;
1649-
}
1650-
16511645
seq_printf(m,
16521646
"\n protection: (%ld",
16531647
zone->lowmem_reserve[0]);
16541648
for (i = 1; i < ARRAY_SIZE(zone->lowmem_reserve); i++)
16551649
seq_printf(m, ", %ld", zone->lowmem_reserve[i]);
16561650
seq_putc(m, ')');
16571651

1652+
/* If unpopulated, no other information is useful */
1653+
if (!populated_zone(zone)) {
1654+
seq_putc(m, '\n');
1655+
return;
1656+
}
1657+
16581658
for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++)
16591659
seq_printf(m, "\n %-12s %lu", zone_stat_name(i),
16601660
zone_page_state(zone, i));

0 commit comments

Comments
 (0)