[U-Boot] 'load mmc' speed varies significantly

Simon Goldschmidt simon.k.r.goldschmidt at gmail.com
Sat Nov 10 12:37:33 UTC 2018


On 10.11.2018 09:37, Jan Kiszka wrote:
> Hi all,
>
> I'm getting significant speed differences while loading kernel and
> initrd from an ext4 rootfs on an SD card via the 'load' command:
>
> ## Executing script at 80000000
> 54764 bytes read in 296 ms (180.7 KiB/s)
> 12359688 bytes read in 42982 ms (280.3 KiB/s)
> 4333462 bytes read in 441 ms (9.4 MiB/s)
>
> The script just does
>
> setenv bootargs root=/dev/mmcblk1p2 rw rootwait
> load ${devtype} ${devnum}:2 ${fdt_addr_r} /usr/lib/linux-image-4.14.67+/${fdtfile}
> load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} /boot/vmlinuz-4.14.67+
> load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} /boot/initrd.img-4.14.67+
> booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
>
> So, the kernel takes an eternity while the initrd on the very same
> filesystem loads at full speed. Moreover, when I rewrite the kernel like
> this
>
> # cat /boot/vmlinuz-4.14.67+ > /boot/vmlinuz-4.14.67+.rewrite
> # mv /boot/vmlinuz-4.14.67+.rewrite /boot/vmlinuz-4.14.67+
>
> the transfer speed is fine for it as well.

I had the same problem when creating a new fit image (itb file) via 
mkimage in the running system. However, I only had this slow speed 
problem when the file system was small (not many free blocks left when 
writing the itb. With a larger file system, there was no such problem.

That led me to think it has to do with fragmented files, but I haven't 
continued to check since the problem is now gone for me...

Simon

>
> I'm currently seeing this on an AM65xx (downstream U-boot, 2018.01-
> based), but I had the very same effect on other boards (e.g. Orange Pi
> Zero) with upstream U-boot as well in the past. We generate the
> filesystem and the SD card image via wic - possibly with some
> unfortunate parameters?
>
> Anyone any idea?
>
> Thanks,
> Jan
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot




More information about the U-Boot mailing list