[sodaville] [RFC] [PATCH V2] Adding DTB to architecture independent vmlinux

David VomLehn dvomlehn at cisco.com
Fri Oct 29 05:00:53 EST 2010


On Thu, Oct 28, 2010 at 09:38:29AM -0700, H. Peter Anvin wrote:
> On 10/28/2010 9:35 AM, Sebastian Andrzej Siewior wrote:
>> H. Peter Anvin wrote:
>>> How big are these blobs in the typical case? Padding to the page size
>> You usually pad the dtb by 1kib (-p 1024 in dtc). Converting all dtbs in
>> powerpc's tree leads to:
>> 991545 / 130 = 7627 bytes average.
>>
>
> So expanding to a page is a lot of memory, but it's pretty important to  
> jettison unused DTBs.
>
> 	-hpa

IIRC, the slab allocator will simply use the buddy allocator when allocating
close to or above the page size. So, this will use 8192 bytes whether
you use what I had proposed or you dynamically allocate space and copy it
from the .init section.

If memory usage is not an issue, it would be nice to avoid the copy. Another
possible consideration is image size. If you don't do the rounding, you'll
have a smaller boot image. Not really sure how to weigh these and whether there
are other considerations.
-- 
David VL


More information about the devicetree-discuss mailing list