[U-Boot] Slow standalone routine with U-Boot

Wolfgang Denk wd at denx.de
Fri Dec 17 19:18:37 CET 2010


Dear Lennart Sundberg,

In message <AANLkTik6wti_DTFLsPfT+y_ZtHFsz-XrQx4tF8H_Lnj5 at mail.gmail.com> you wrote:
>
>  I am trying to implement a memory and CPU demanding standalone application
> on the beagleboard by hacking U-Boot.
> 
>  To my surprise, the U-Boot program is ten times slower than the same
> program running under Linux on the beagleboard.

This is not a surprise...

>  U-Boot version = u-boot-2010.09

...given that old version of U-Boot.

In that old code, U-Boot was running with cahces disabled, which
explains the poor performance you see.

Update and use recent code instead.  This will include this commit
then:

commit 95c6f6d34d4ff23f4d005488d84682eec5fa9ec8
Author: Heiko Schocher <hs at denx.de>
Date:   Fri Sep 17 13:10:31 2010 +0200

    ARM V7 (OMAP): add data cache support, test on Beagle board
    
    Add data cache support for ARM V7 systems. Used cache flush
    functions from linux:arch/arm/mm/cache-v7.S developed from
    Catalin Marinas.
    
    Enable "cache" command on Beagle board and test performance.
    
        Test 1: Loading 127 MB of data from NAND flash into RAM:
    
        Instr. Cache    off     on      on
          Data Cache    off     off     on
        --------------------------------------------------
        Beagle (Cortex A8)      116s    106s    30.3s   = x 3.8
    
        Test 2: uncompressing a gzipped image from RAM to RAM
                (size compressed: 6.5 MiB, uncompressed: 35 MiB):
    
        Instr. Cache    off     on      on
          Data Cache    off     off     on
        --------------------------------------------------
        Beagle (Cortex A8)      1.84s   1.64s   0.12s   = x 15.3
    
    Portions of this work were supported by funding from
    the CE Linux Forum.
    
    Signed-off-by: Heiko Schocher <hs at denx.de>
    Reviewed-by: Ben Gardiner<bengardiner at nanometrics.ca>


As you can see, CPU and memory bound executin may improve by a factor
of 15 or so ...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I'm a programmer: I don't buy software, I write it.
                                                  -- Tom Christiansen


More information about the U-Boot mailing list