Re: [RFC] memory page_alloc zonelist caching speedup

Paul Jackson
2006-10-10T07:03:31Z

> When a free occurs for a given zone, increment its counter. If that
> reaches some threshold, zap that node in the nodemask so it's checked on
> the next alloc. All the infrastructure is already there for this support
> in your patch.

It's not an issue of infrastructure. As you say, that's likely already
there.

It's the inherent problem in scaling an N-by-N information flow,
with tasks running on each of N nodes wanting to know the latest
free counters on each of N nodes. This cannot be done with a small
constant (or linear, but so small it is nearly constant) cache
footprint for both the freers and allocators, avoiding hot cache lines.

In your phrasing, this shows up in the "zap that node in the nodemask"
step.

We don't have -a- nodemask.

My latest patch has a bitmask (of length longer than a nodemask,
typically) in each zonelist. No way do we want to walk down each
zonelist, one each per node, per ZONE type, examining each zone to see
if it's on our node of interest, so we can clear the corresponding bit
in the bitmask. Not on every page free. Way too expensive.