Re: [PATCH 00/14] Zoned VM counters V5

Christoph Lameter
2006-06-21T17:16:00Z

On Wed, 21 Jun 2006, Martin Bligh wrote:

> > Yes later patches also use the counters for other things. Please check out
> > the patch that uses these for numa counters etc.
>
> OK, but looked like the original implementation was sort of tied to
> zones / the VM, at least in terminology, and code placement. I'll look
> at it again ...

Yes it is. This one is useful only for zone related information.

> > Also smaller counters help keep the pcp structure in one cacheline and
> > reduces the cache footprint.
>
> Sure, but for a normal sized system, the smaller the per-cpu portion,
> the more atomic ops you'll end up doing, surely?

So we now do two atomic ops for every 32 increments (threshold). If we
increment the threshhold then we reduce the atomic overhead but this also
influences the inaccurary of the global and per zone counter because
there is the potential of more counter update deferrals. Keeping the
threshold low makes the global and per zone counter more up to date.
I think 32 is a good compromise.