Re: Purpose of the mm/slab.c changes

Manfred Spraul (
Sun, 09 Sep 2001 18:55:00 +0200

Alan Cox wrote:
> > > doesn't matter which free page is used first/last.
> >
> > You're full of crap.
> > LIFO is obviously superior due to cache re-use.
> Interersting question however. On SMP without sufficient per CPU slab caches
> is tht still the case ?

Correct. SMP was perfect LIFO even without Andrea's changes.

I thought Andrea tried to reduce the fragmentation, therefore I wrote
"free is free".

But even for cache re-use his changes are not a big change: The main
fifo/lifo ordering on UP is mandated by the defragmentation property of
the slab allocator.

Afaics there is exactly one case where my code is not lifo and Andrea's
is: kmem_cache_free frees the last object in slab, each slab contains
more than one object, and there are no further partial slabs.
In all other cases Andrea just adds list_del();list_add() instead of
changes to the firstnotfull pointer.

full->partial is/was lifo,
partial->partial doesn't change the lists at all
partial->empty was fifo, is now lifo_if_no_partial_slab_exists

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at