-
Notifications
You must be signed in to change notification settings - Fork 29
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 tweaks, booting faster by 5 seconds #265
Conversation
This speeds up the kernel boot time by 2.5 seconds, because the kernel doesn't have to wait for the serial console to accept the kernel's verbose messages.
Allows users to add more kernel parameters to config.uEnv.
Kernel boots faster by 2.5 second, and userspace boots faster by another 2.5 seconds only due to "quiet" kernel option. |
Great! With all the important improvements made in the last weeks behind the curtain this is very noticeable also to the average user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me !
yes the synchronus nature of the kernel messages on the console is a problem. I also tested this 2 days ago as i created a non-quiet kernel. I have also noticed that we loose a lot of time in device initialization due to all the compiled in modules. |
Please post numbers |
Monolithic kernel:
Modular kernel (reverted dd8b3db):
So yes, there is a difference, of course there is. It's 40ms for loading an additional 1 MB of kernel from the SD card, plus the boot time is delayed by 110ms. But we're really talking about 150ms, not 3000ms. |
Here is a kernel message of the non-modular kernel: Here is the modular one: [ 3.816154] systemd[1]: systemd 249.7+ running in system mode (-PAM -AUDIT -SELINUX -APPARMOR -IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid) vs [ 7.121839] systemd[1]: systemd 249.7+ running in system mode (-PAM -AUDIT -SELINUX -APPARMOR -IMA -SMACK +SECCOMP -GCRYPT -GNUTLS -OPENSSL -ACL +BLKID -CURL -ELFUTILS -FIDO2 -IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK -PCRE2 -PWQUALITY -P11KIT -QRENCODE -BZIP2 -LZ4 -XZ -ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=hybrid) |
My kernel finishes booting after 0.8 seconds. Your modular kernel needs more than 3 seconds. Something's very wrong with your measurements. |
Don´t look at journalctl. Look at dmesg. |
I did. Didn't you see that my paste has the same dmesg-style time stamps, and no journalctl formatting? |
Could that still be due to the serial line? |
I'll try your PR #265 and see if that makes a significant difference. |
But... this is PR #265. If you weren't using these patches, which I advertised as speeding up kernel boot by 2.5 seconds, of course you had 2.5 seconds longer kernel boot times. And your monolithic/modular times are irrelevant. That is what was wrong with your measurements! |
The measurements are both from master, one with your mono kernel patch, one without. There is nothing "wrong" with these measurements. They very well apply to master. |
The numbers are useless for arguing against a monolithic kernel, beacuse its bad boot performance was not actually being caused by it being monolithic, but by a serial console which was slowing down the boot process. With a "quiet" kernel, that aspect disappears completely. |
@MaxKellermann this looks good, but if I'm reading it right, we will no longer get any log on serial console (correct me if I'm wrong)? Is there a way to enable the logging when (for example) debugging a device that doesn't boot? |
Errors will still show with the quiet option. Its just the general kernel messages that will only accessible via dmesg. Potentially we could create a "debug" entry in u-boot configuration that could be selected manually. Most linux distros do this and do a full verbose boot. |
Correct. This just removes boring messages from the serial console, but keeps them in dmesg. They are not lost, they are just not printed on the serial console.
There's no u-boot "menu" (as in "grub menu") where a user can select an "entry". u-boot is non-interactive. |
I used serial console in several situations and it helped a lot - e.g. when openvario was constantly rebooting in a loop without showing anything on screen and there was no way to get to dmesg output.
Cool, that works for me. |
While there is no interactive grub-style menu, you could set an alias like Potentially it could also be triggered by the remote stick. For example pressing and holding "F1". |
No description provided.