Thread (13 messages) 13 messages, 4 authors, 2005-12-23

Re: [RFC] genalloc != generic DEVICE memory allocator

From: Andrey Volkov <hidden>
Date: 2005-12-22 15:44:46
Also in: lkml

Pantelis Antoniou wrote:
Andrey Volkov wrote:
quoted
Hi Pantelis,

Pantelis Antoniou wrote:
quoted
Andrey Volkov wrote:
[snip]
quoted
quoted
Hi Andrey,

FYI, on arch/ppc/lib/rheap.c theres an implementation of a remote heap.

It is currently used for the management of freescale's CPM1 & CPM2
internal
dual port RAM.

Take a look, it might be what you have in mind.

Regards

Pantelis


Thanks I missed it (and small wonder! :( ).

Andrew, Is somebody count HOW MANY dev specific implementation
of buddy/first-fit allocators now in kernel?
Yes, it is indeed messy.

The rheap implementation is generic enough and I believe can fit most of
the
special memory allocators needs. If you'd like I could move it somewhere
generic and test it.
I'm sure lib/ will be appropriate place. and something like
"DON'T TRY REINVENT WHEEL, TRY FIX EXISTS" in documentation/ :).

Now couple word about rheap: I understand why you are use static
alignment in allocator, but its very specialized for CPM. IMO, align
must be a param of xx_alloc. For ex: device may demand alignment by
8 bytes, which ok until... you are try map this memory to the user
space (don't shoot at me, remember about framebuffer & co).

-- 
Regards
Andrey Volkov
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help