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

Grant Likely grant.likely at secretlab.ca
Mon Nov 1 15:15:07 EST 2010


On Thu, Oct 28, 2010 at 2:00 PM, David VomLehn <dvomlehn at cisco.com> wrote:
> 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.

The choice to copy could be made a Kconfig option, but I doubt it is
warranted.  A one time copy of one or two pages at boot is pretty
speedy.  I'll let someone with benchmarks results prove me otherwise.

g.


More information about the devicetree-discuss mailing list