Re: mm fragmentation patch

MOLNAR Ingo (mingo@valerie.inf.elte.hu)
Thu, 16 Jul 1998 21:48:01 +0200 (MET DST)


On Thu, 16 Jul 1998, Colin Plumb wrote:

> When you use blocks in LIFO (stack) order, the back of the list gets
> clogged up with blocks that don't get used and don't get combined,
> either. Because no neighbours want to combine with them, allocating
> them doesn't block any defragmentation, so they're the best blocks to
> put to use. But instead a few blocks at the head of the list get all
> the traffic.

while FIFO is usually better for caching, it has a hidden effect on SMP,
freshly freed and reallocated dirty pages might generate cross-CPU cache
invalidation traffic if a page shows up on 'another' CPU. If they are
LIFO, dirty cachelines get clean in a 'natural' way, by getting kicked out
of the LRU scheme sometime. (possibly giving a more effective way of
writeback, instead of the forced writeback)

so LIFO might even end up performing better on SMP, when compared to the
current allocator.

(although there is a better way to solve this on SMP, by doing per-CPU
freelists, but anyway)

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html