
Hi Tom,
On 22 May 2017 at 16:15, Tom Rini trini@konsulko.com wrote:
On Fri, May 19, 2017 at 08:30:43AM -0600, Simon Glass wrote:
This moves an entire board to use a live device tree as an example of the impact.
Nyan-big was chosen because I can easily and boot U-Boot without any media swapping, etc.
Total code size impact on this board is approximately 9KB on U-Boot and 64 bytes on SPL:
27: dm: tegra: nyan-big: Move to livetree arm: (for 1/1 boards) all +9264.0 bss -16.0 data +44.0 rodata +92.0 spl/u-boot-spl:all +326.0 spl/u-boot-spl:rodata +262.0 spl/u-boot-spl:text +64.0 text +9144.0
Tegra does not use Thumb2, which would likely reduce the code size by about 25%, indicating a code-size impact of perhaps 7KB.
So, did your buildman output get messed up in the copy/paste? I see both of the numbers you're saying, but it's all vs u-boot-spl. The 64 bytes in SPL sounds good.
I think this is right. See 'text +9144.0' which means 9KB of extra in ARM (not Thumb).
I have not yet collected reliable detailed timing information. I will do that with the next version of this series, after comments are received. I expect that building the live tree will take a little time, and that using it will be very slightly faster.
I assume that you're in the process of rectifying this with the bootstage patches you posted but FWIW I still use http://elinux.org/Grabserial as my first weapon-of-choice in these kinds of things.
Fair enough, but it's hard to measure down to milliseconds isn't it? Also, outputting text affects the timing.
Yes I have completed the timing. Sneak preview...the times above are times to start up driver model at each stage, in microseconds:
Boot time is affected slightly. For nyan-big the times with flat tree are:
2,108 dm_r 7,924 dm_spl 120,724 dm_f 171,816 lcd
With the livetree:
721 dm_r 3,764 of_live 7,990 dm_spl 120,736 dm_f 168,215 lcd
As expected the spl and pre-relocation times are not affected. In the post-relocation case, the live tree must be built, which here takes about 3.8ms. Driver-model device creation takes a bit of 1ms less time with the livetree, so all up the cost is about 2.4ms. After DM init there appears to be a slight reduction in the time taken to set up devices (from 327ms to 319ms) so overall the live tree does not appear to be any slower. This is because pre-parsing the device tree makes reading it later faster.
Regards, Simon