orangepi5: fix slow boot on current kernel#9449
Conversation
https://paste.armbian.com/uhomuwajos (didn't have a 'before' log for 6.18.y handy but the issue is the same). https://paste.armbian.com/ocarimopey after the change. Interestingly this seem to be an issue for quite a while since the change was introduced in Jan 2024: armbian#6202
for the sake of completeness
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request modifies the Rockchip 64-bit Linux kernel configuration file to enable CPU frequency scaling, USB Type-C controller support, and comprehensive netfilter/IPv4/IPv6 NAT, masquerading, and bridge filtering capabilities. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
I don't see anything suspicious to cause regressions. A few of modules are going back into the kernel and you saw improvements ... |
|
The odd thing is that it looks like nobody else complained yet. Perhaps because once fully booted it acts normal. Anyway I'd like to wait for Paolo's opinion. |
|
What about adding the modules into initramfs instead of making the drivers built-in? |
|
The ones set to |
|
✅ This PR has been reviewed and approved — all set for merge! |
I guess that would work too but I think editing the kernel config is easier than creating a function or bsp thing to add those modules to initramfs? |
Universal distros like debian prefer modules, and they should have similar issues. This family is aming at a specific platform so make some drivers built-in is fine. I don't know if I recall it correctly, sometimes rewrite-kernel-config may make some drivers into module. |
While having no evidence I also believe this may happen sometimes. This is why I also did a rewrite to make sure it stays. |
That should only happen when dependency drivers are set to module. I always check with https://www.kernelconfig.io/CONFIG_R8169 to set the them to y or m depending on what you want to achieve |
Sometimes
A nest of wasps; initramfs-tools might behave different than dracut or mkosi-initrd on the topic of selecting which modules get put into the initramfs. When building initramfs on the machine itself (eg when apt-upgrading kernel) might give different results than when building an image, as initramfs-tools might consider "what modules has the the host loaded right now". It's headache-inducing, and prone to change soon as fedora -> mkosi, ubuntu -> dracut, and who knows what else. I'd say say just make them required things
Not arbitrarily -- it does what it is told to do (usually in armbian-kernel.sh or hooks in family code) -- a rewrite should reveal if things are changed or not. |
|
@EvilOlaf Hello! I tend to be in accordance with other opinions about putting those modules as built-ins if they solve the slow boot problem. The merge request from 2024 fixed some weird kernel config overhaul happened for some - unknown to me - reason. There I restored the previous rockchip64 kernel configs and advanced them manually, but there are no reasons to stick to those configs if they cause issues since I did not really paid attention to module vs. built-in at that time. I will run some tests on the next few days on my rorkchip64 boards, but I'm pretty sure there won't be any issues, so for me this is ok to merge as will 👍 |
|
Alright. Thank you everyone for your input. |
|
Had the time to check in for older rockchip64 devices. Both rk3399 and rk3328 works fine. Rk3399 (orangepi4-lts) type-c connector also still works fine (Power Delivery + HDMI + USB tested, both type-c connector orientations) |
Description
During my journey bumping rockchip64 to 7.0 I noticed that my orangepi5 was quite slow with booting and also showed very poor performance on raid6 test during boot. After poking around for quite a while I noticed that some stuff kicked in quite late during boot. Attempted to fix by building in instead of having modules apparently fixed the issue.
This affects both
currentandedge. However sinceedgeis out for bump I included a fix for this in the respective PR.Interestingly this seem to be an issue for quite a while since the change was introduced in Jan 2024: #6202
I guess it DID apply for rk3588 😀 l @paolosabatino
Since this most likely affects other rockchip64 boards as well this shall be tested on various hw before merge
How Has This Been Tested?
Checklist:
Summary by CodeRabbit