Re: [patch] mm, zoneinfo: print non-populated zones

From: David Rientjes
Date: Fri Mar 03 2017 - 17:46:08 EST


On Fri, 3 Mar 2017, Anshuman Khandual wrote:

> > This patch shows statistics for non-populated zones in /proc/zoneinfo.
> > The zones exist and hold a spot in the vm.lowmem_reserve_ratio array.
> > Without this patch, it is not possible to determine which index in the
> > array controls which zone if one or more zones on the system are not
> > populated.
>
> Right, its a problem when it does not even display array elements with
> an index value associated with it. But changing the array display will
> break the interface where as displaying non populated zones in the
> /proc/zoneinfo does not break anything.
>

Precisely.

> The name of the Boolean "populated" is bit misleading IMHO. What I think you
> want here is to invoke the callback if the zone is populated as well as this
> variable is true. The variable can be named something like 'assert_populated'.
>

I like it, I'll send a v2. Thanks.