[U-Boot] boot-up time optimization. Where to start?

Simon Glass sjg at chromium.org
Thu May 5 22:18:00 CEST 2011


On Thu, May 5, 2011 at 11:10 AM, Charles Manning <manningc2 at actrix.gen.nz>wrote:

> On Thursday 05 May 2011 17:32:20 Wolfgang Denk wrote:
> > Dear Alexander Stein,
> >
> > In message <201105030848.17576.alexander.stein at systec-electronic.com>
> you
> wrote:
> > > This specific version was selected due to relocation problems on ARM.
> But
> > > I expect the dcache doesn't have that big influence on the named code
> > > part as the environment is already in RAM.
> >
> > Your expectation is most likely completely wrong.  Reading from /
> > writing to uncached RAM is painfully slow compared to a system with
> > caches turned on.  And if you - as I speculate - need to checksum a
> > huge amount of data, this will delay things without need.
>
> Caching has a huge effect on **all** code and is the first thing I'd play
> with
> in trying to speed things up.
>

Yes agreed. Running U-Boot without caching is a great way to slow boot time.
In fact we should turn on the L2 cache if there is one.

>
> I have been doing some stuff to speed omap3 booting. It was taking approx 4
> seconds from power up until the kernel started spewing boot messages. That
> is
> now down to less than 2 secs (including the funky omap3 romboot time,
> loading
> uboot from NAND and then loading the kernel from NAND). Only difference was
> turning on caching in uboot using the caching commands.
>

I have a Seaboard (Tegra2) networking booting using a USB dongle in about 5s
with console output, about 3s of which is USB and PHY delay. Turning off
caching adds several seconds mainly because the tftp is so much slower. The
same would apply for any boot medium. I have a patch which displays boot
time in microseconds if it is of interest to anyone:

Timer summary in microseconds:
       Mark    Elapsed  Stage
          0          0  awake
    193,298    193,298  usb_start
  1,342,411  1,149,113  eth_start
  3,767,039  2,424,628  bootp_start
  3,790,121     23,082  bootp_stop
  3,790,293        172  tftp start
  4,761,459    971,166  tftp done
  4,761,489         30  bootm_start
  4,892,145    130,656  start_kernel

Regards,
Simon


> -- Charles
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list