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

David VomLehn dvomlehn at cisco.com
Tue Nov 2 12:27:44 EST 2010


On Mon, Nov 01, 2010 at 12:15:07AM -0400, Grant Likely wrote:
> 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.

It wouldn't surprise me if the time to copy weren't made up in one place or another
by the smaller size. I'm happy with .init and a memcpy(). :-)
-- 
David VL


More information about the devicetree-discuss mailing list