-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
u-boot: eMMC transfer speed significantly slower than stock u-boot on Tegra186 #42
Comments
I'm guessing the clock rate isn't being set correctly on the yocto version of the bootloader. |
Debug logging in the tega mmc driver indicates the clock is being adjusted prior to kernel load. Also verified the data bus width is set to 8.
|
I've noticed this with R28.1-based builds, too. I just haven't had a chance to track it down yet. |
Oddly, this seems to be related to the root file system layout rather than u-boot itself. I was able to swap out the u-boot built with yocto and still get the high speed load of the kernel using the stock ubuntu rootfs. I'm also able to get the slow transfer using the R28.1 bootloader with a yocto rootfs. |
Stock R28.1
Yocto
|
Adding
|
If I change |
Confirmed that |
The usage of ext4 with a yocto image can cause slow loading of the kernel image from u-boot (See #42). As a workaround, an ext3 filesystem can be used, so allow integrators to override the default ext4 filesystem. (PR #44) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Matt Madison <matt@madison.systems>
instead of bundling the initramfs with the kernel, with a new variable, TEGRA_INITRAMFS_INITRD. (Related to #42) Signed-off-by: Matt Madison <matt@madison.systems>
to reduce the size of the kernel image. (Related to #42) Signed-off-by: Matt Madison <matt@madison.systems>
for some ext4-related patches. (for #42) Signed-off-by: Matt Madison <matt@madison.systems>
The root cause of this issue is that U-Boot's ext4fs support does not handle extents very well. When a file gets large enough, extent index blocks will get created for it, and that leads to exercising a very slow code path. I added some changes to the kernel recipe to make it easier to split the initramfs out of the kernel and into a separate initrd file, to help reduce the size of the Image file. I also changed the default ext4 options to increase the block size. While these would help in some cases (depending on kernel configuration and such) they were really workarounds. So I've patched U-Boot to cache extent index blocks while reading a file. It's not the most elegant way to deal with the issue, but it's minimally intrusive. With the patch in place I'm seeing 30MiB/sec+ transfers for the kernel, instead of 1MiB/sec. |
The usage of ext4 with a yocto image can cause slow loading of the kernel image from u-boot (See #42). As a workaround, an ext3 filesystem can be used, so allow integrators to override the default ext4 filesystem. (PR #44) Signed-off-by: Derek Straka <derek@asterius.io> Signed-off-by: Matt Madison <matt@madison.systems>
instead of bundling the initramfs with the kernel, with a new variable, TEGRA_INITRAMFS_INITRD. (Related to #42) Signed-off-by: Matt Madison <matt@madison.systems>
to reduce the size of the kernel image. (Related to #42) Signed-off-by: Matt Madison <matt@madison.systems>
for some ext4-related patches. (for #42) Signed-off-by: Matt Madison <matt@madison.systems>
@madisongh is there any interest in submitting your commit 75663dd9bf063f82cd7b578e7c43f9c5d3b2a51b upstream? I'm seeing a similar issue on a non-tegra system. |
@drewmoseley I always thought that patch was a bit of a hack, so I never thought it would be worth upstreaming. Looks like one of the NVIDIA engineers has already posted a similar patch, although I don't see that it's been pulled in. |
When loading a kernel from the eMMC device, the stock u-boot is able to copy data at a rate of ~36.2 MiB/s while the yocto u-boot only transfers at ~314.5 KiB/s.
Stock u-boot:
Built u-boot:
The text was updated successfully, but these errors were encountered: