Skip to content

Commit

Permalink
mm, vmstat: Remove spurious WARN() during zoneinfo print
Browse files Browse the repository at this point in the history
After commit e2ecc8a ("mm, vmstat: print non-populated zones in
zoneinfo"), /proc/zoneinfo will show unpopulated zones.

A memoryless node, having no populated zones at all, was previously
ignored, but will now trigger the WARN() in is_zone_first_populated().

Remove this warning, as its only purpose was to warn of a situation that
has since been enabled.

Aside: The "per-node stats" are still printed under the first populated
zone, but that's not necessarily the first stanza any more.  I'm not
sure which criteria is more important with regard to not breaking
parsers, but it looks a little weird to the eye.

Fixes:  e2ecc8a ("mm, vmstat: print node-based stats in zoneinfo file")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Reza Arbab <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Anshuman Khandual <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rarbab authored and torvalds committed May 12, 2017
1 parent 572e0ca commit 8d35bb3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mm/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,8 +1359,6 @@ static bool is_zone_first_populated(pg_data_t *pgdat, struct zone *zone)
return zone == compare;
}

/* The zone must be somewhere! */
WARN_ON_ONCE(1);
return false;
}

Expand Down

0 comments on commit 8d35bb3

Please sign in to comment.