Re: [PATCH] genalloc: make possible to use a custom allocation algorithm

From: Linus Walleij
Date: Fri Sep 07 2012 - 17:22:23 EST


On Fri, Sep 7, 2012 at 11:16 AM, Benjamin Gaignard
<benjamin.gaignard@xxxxxxxxxx> wrote:

> From: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxxx>
>
> This patch allow to use another algorithm than the default first-fit one.
> For example a custom algorithm could be used to manage alignment requirements.
>
> Add of best-fit algorithm function:
> most of the time best-fit is slower then first-fit but memory fragmentation is lower.
> Random buffer allocation/free tests don't show any arithmetic relation between
> allocation time and fragmentation but best-fit algorithm is sometime able to perform the allocation when first-fit can't.
>
> This new algorithm help to solve fragmentation issues on ESRAM shared by multiple
> hardware IP allocating and freeing dynamically memory region of various sizes.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxxx>

We really need this to manage our on-chip RAM
(ESRAM) which is a scarce resource, so:
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij
--
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/