From: Jason Cooper Date: Tue, 8 May 2012 11:48:47 -0400 Subject: [U-Boot] [PATCH] ext2load: increase read speed In-Reply-To: <20120426125451.GA2952@avionic-0098.mockup.avionic-design.de> References: <1332945431-12441-1-git-send-email-u-boot@lakedaemon.net> <20120426125451.GA2952@avionic-0098.mockup.avionic-design.de> Message-ID: <20120508154847.GD15711@titan.lakedaemon.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Apr 26, 2012 at 02:54:51PM +0200, Thierry Reding wrote: > * Jason Cooper 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. > > > > Signed-off-by: Jason Cooper > > 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, so: > > Tested-by: Thierry Reding Thanks for testing! I've added your results to the commit message and will be doing a pull request shortly. thx, Jason.