|
|
About ::
TODO ::
Blog ::
RSS ::
Old blog ::
Projects ::
GIT ::
Gallery ::
Notes
Fri, 20 Apr 2007
Power-of-two allocators.
Eric Dumazet has rised an interesting question
about existing power-of-two allocator related
to no-mmu implementation of the - is it possible to allocate higher-order page
and then return part of it as unused (for example if
someone has allocated 10-order page and then return 8-order
part).
As far as I can tell (I'm not absolutely sure though) it is impossible with SLAB one -
each page can only be 'split' into the same-sized parts, so
either 10-order, or two 9-order, or 4 8-order, but not one 8-order
and one 10-order minus 8-order.
That was one of the reasons I created network allocator,
which I proved does fix such power-of-two overhead in the single page,
i.e. blocks are combined when freed to form bigger one, and it is possible
to allocate exactly requested block not aligned to power-of-two boundary.
But my allocator did not get enough attention (did I say that already for something unrelated? :),
so it was a bit postponed.
Let's see, if there will be some interesting suggestions in the thread.
Update: David Howells of RedHat seems to be sure, that it is possible to
allocate an order-10 page, then release part of it (say an order-8 subpage). But from
the whole thread it seems that he says about no-mmu case, which can work
on top of SLOB allocator in some embedded system.
/devel/networking/nta :: Link / Comments ()
|