Re: [rfc][patch 2/3] slab: introduce SMP alignment

Christoph Lameter
2008-03-07T05:12:12Z

On Fri, 7 Mar 2008, Nick Piggin wrote:

> > No the slab allocators were optimized for VSMP so that the
> > internode_alignment is not necessary there. That was actually one of the
> > requirements that triggered the slab numa work.
>
> BTW. can you explain this incredible claim that the slab allocators
> do not need internode_alignment to avoid false sharing of allocated
> objects on VSMP? I don't understand how that would work at all.

The queues are per node which means that pages from which we allocate are
distinct per node. As long as processes allocate and free object on a
single node all is fine. Problems can arise though if objects are used
across node. The earlier incarnation of SLAB had a single global queue for
slab pages and objects could be allocated from an arbitrary processor.
Objects from the same page were allocated from all processors.