[PATCH] rheap: eliminates internal fragments caused by alignment
Li Yang-r58472
LeoLi at freescale.com
Tue Jun 19 14:02:09 EST 2007
> -----Original Message-----
> From: Pantelis Antoniou [mailto:pantelis.antoniou at gmail.com]
> Sent: Monday, June 18, 2007 8:31 PM
> To: joakim.tjernlund at transmode.se
> Cc: Li Yang-r58472; Paul; Vitaly Bordug; linuxppc-dev Development
> Subject: Re: [PATCH] rheap: eliminates internal fragments caused by alignment
>
>
> On 18 Ιουν 2007, at 3:25 ΜΜ, Joakim Tjernlund wrote:
>
> > On Mon, 2007-06-18 at 15:14 +0300, Pantelis Antoniou wrote:
> >> Hi Li,
> >>
> >> The patch appears fine at first glance.
> >>
> >> I'm really curious what kind of alignment do you use in order to
> >> have so
> >> much wasted space that re-inserting the leftovers makes so much of a
> >> difference.
>
> Jocke,
>
> Ugh, 256?
>
> That's not nice at all.
Pantelis,
For QE, most of the MURAM allocation requires relative large alignment. SDMA buffer even needs a 4k alignment.
> I'm not sure that even then you're going to have any guarantees that
> the allocations will be successful.
>
> I'm afraid that in those case it would be better for the board
> platform setup to have the space preallocated according to the BSP
> requirements.
Dynamic allocation surely can't match the efficiency of manual allocation. But with this patch applied, the utilization efficiency will be good enough for most systems to work correctly, and without the great trouble to partition the space yourself. Moreover, given the fact that in QE drivers some MURAM usage can be tunable, it will be more suitable to use the dynamic allocation.
A general policy will be helpful, that allocations with huge alignment (like 4k) should always be done as early as possible.
- Leo
More information about the Linuxppc-dev
mailing list