[U-Boot] [PATCH v2] ext2load: increase read speed
Wolfgang Denk
wd at denx.de
Thu Jun 21 22:49:47 CEST 2012
Dear Jason Cooper,
In message <1338566090-15008-1-git-send-email-u-boot at lakedaemon.net> you wrote:
> This patch dramatically drops the amount of time u-boot needs to read a
> file from an ext2 partition. On a typical 2 to 5 MB file (kernels and
> initrds) it goes from tens of seconds to a couple seconds.
>
> All we are doing here is grouping contiguous blocks into one read.
>
> Boot tested on Globalscale Technologies Dreamplug (Kirkwood ARM SoC)
> with three different files. sha1sums were calculated in Linux
> userspace, and then confirmed after ext2load.
>
> The following test results were provided by Eric Nelson:
>
> Tested on i.MX6 Sabre Lite board loading a file of ~900k:
>
> Without patch:
>
> MX6QSABRELITE U-Boot > time ext2load sata 0:1 12000000
> /usr/lib/libperl.so.5.12.4 && crc32 12000000 $filesize
> Loading file "/usr/lib/libperl.so.5.12.4" from sata device 0:1
> (hda1)
> 958032 bytes read
>
> time: 0.414 seconds, 414 ticks
> CRC32 for 12000000 ... 120e9e4f ==> 550deec9
>
> With patch:
> MX6QSABRELITE U-Boot > time ext2load sata 0:1 12000000
> /usr/lib/libperl.so.5.12.4 && crc32 12000000 $filesize
> Loading file "/usr/lib/libperl.so.5.12.4" from sata device 0:1
> (hda1)
> 958032 bytes read
>
> time: 0.205 seconds, 205 ticks
> CRC32 for 12000000 ... 120e9e4f ==> 550deec9
>
> And, the following results were reported by Thierry Reding:
>
> Before:
>
> Tegra2 (Medcom) # time ext2load mmc 0 0x17000000 /boot/uImage
> Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
> 5609104 bytes read
>
> time: 4.638 seconds, 4638 ticks
> Tegra2 (Medcom) # crc32 0x17000000 559690
> CRC32 for 17000000 ... 1755968f ==> 158788be
>
> After:
>
> Tegra2 (Medcom) # time ext2load mmc 0 0x17000000 /boot/uImage
> Loading file "/boot/uImage" from mmc device 0:1 (xxa1)
> 5609104 bytes read
>
> time: 0.317 seconds, 317 ticks
> Tegra2 (Medcom) # crc32 0x17000000 559690
> CRC32 for 17000000 ... 1755968f ==> 158788be
>
> I can also successfully load the loaded uImage to a prompt
>
> End results.
>
> Signed-off-by: Jason Cooper <u-boot at lakedaemon.net>
> Tested-by: Eric Nelson <eric.nelson at boundarydevices.com>
> Tested-by: Thierry Reding <thierry.reding at avionic-design.de>
> ---
> Changes since v1:
> - updated commit entry to include test results from Eric Nelson and Thierry
> Reding
>
> Based against tag 2012.04.01
>
> fs/ext2/ext2fs.c | 26 ++++++++++++++++++++++++--
> 1 files changed, 24 insertions(+), 2 deletions(-)
Applied, thanks.
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
When it is incorrect, it is, at least *authoritatively* incorrect.
- Hitchiker's Guide To The Galaxy
More information about the U-Boot
mailing list