From: Aaron Williams <Aaron.Williams@caviumnetworks.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] fdt performance
Date: Mon, 13 Jan 2014 22:13:40 -0800 [thread overview]
Message-ID: <52D4D594.3000108@caviumnetworks.com> (raw)
In-Reply-To: <CAPnjgZ3OTR=tVcXjG13tbOzb=_smjd=Qj8Et78xfW5qLND0g6A@mail.gmail.com>
Hi Simon,
Sorry for the long delay.
On 10/17/2013 03:27 PM, Simon Glass wrote:
> Hi Aaron,
>
> On Thu, Oct 17, 2013 at 12:24 AM, Aaron Williams
> <Aaron.Williams@caviumnetworks.com> wrote:
>> Hi all,
>>
>> In our bootloader based off of 2013.07 we make extensive use of the flat
>> device tree. In profiling our bootloader in our simulator I found that the
>> function eating up the most time is fdt_next_tag. Looking at it, especially
>> fdt_offset_ptr, it looks like there is a lot of room for improvement
>> especially in the skip name section.
>>
>> Some of the checks in fdt_offset_ptr also look useless, such as if ((offset
>> + len) < offset) which will always be false, or
>> if (p + len < p)
>>
>> len is always positive.
> Are you using CONFIG_OF_CONTROL?
>
> If so, as a higher-level point, we could bring in an efficient DT
> library, which converts the the FDT into a tree structure for faster
> parsing. I can point you to a starting point if you like.
>
> Regards,
> Simon
A higher-level point is not desirable since when we are experiencing the
performance issues we are running out of NOR flash or our simulator.
Since most of our customers use NOR flash this a huge issue for us. We
have very little memory available for holding data structures since
basically only the stack is available before relocation.
Taking out these checks significantly sped up our boot process.
If you're checking for a wrap-around it should not check for each byte
but should check only once if it will wrap and handle it accordingly. If
we're wrapping then the device tree is hosed and we have bigger problems.
-Aaron
--
Aaron Williams
Software Engineer
Cavium, Inc.
(408) 943-7198 (510) 789-8988 (cell)
next prev parent reply other threads:[~2014-01-14 6:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 6:24 [U-Boot] fdt performance Aaron Williams
2013-10-17 9:48 ` Albert ARIBAUD
2013-10-17 18:55 ` Wolfgang Denk
2013-10-17 19:04 ` Andre Renaud
2013-10-18 20:11 ` Wolfgang Denk
2013-10-20 18:18 ` Michael Pratt
2013-10-21 19:55 ` Wolfgang Denk
2013-10-22 20:43 ` Michael Pratt
2013-10-23 4:13 ` Wolfgang Denk
2013-10-17 22:27 ` Simon Glass
2013-11-14 23:36 ` Scott Wood
2013-11-14 23:52 ` Simon Glass
2014-01-14 6:13 ` Aaron Williams [this message]
2014-01-26 16:56 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D4D594.3000108@caviumnetworks.com \
--to=aaron.williams@caviumnetworks.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox