Re: [PATCH] SLUB: revert direct page allocator pass through

From: Christoph Lameter
Date: Mon Jan 26 2009 - 12:21:36 EST


On Sat, 24 Jan 2009, Nick Piggin wrote:

> > Or if you prefer order-0. Do a single linked list like SLQB does.
>
> The fundamental issues I guess are that slab pages are kernel mapped, and
> within a given slab, the zone and movability are irrelevant.

Right. There are multiple subsystems that all have the same requirements.

> Other ones which could be changed but could introduce regressions are
> watermarks, buddy merging, and struct page error checking and setup.

Isnt it possible to defer that (queuing them (sigh)). A bitmap could be
used to avoid queuing and may even allow fully concurrent allocations
without locks. Use a counter to check watermarks once in a while.

Struct page error checking could only be enabled for debugging purposes.


> I brought all this up when it was discussed. Did you find any ways to
> improve anything?

I played around with some bitmap concepts having basically a bit vector
per MAX_ORDER page (plus giving a preferred order to each MAX_ORDER
chunk in order to avoid fragmenation) but I had to abandon that at the
time due to time constraints.

The bitmap / counter approach could get a way with testing/incrementing a
percpu counter and flipping a bit. One of the reasons that I am quite
pushy on the per cpu atomic ops vs. interrupts is that these would allow
a page allocator fastpath w/o disabling interrupts.

> (I did make that patch to enable refcounting to be avoided FWIW, which
> avoids a couple of atomic operations, but I don't think it brought
> performance up too much, but I still intend to dust it off at some
> point).

Well if the page stays with a refcount of one then we do not need to check
the refcount at all but just push it in an out of some queue / bitmap or
something.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/