Enable memory compaction and RK630 PHY on Rockchip vendor kernels #10175
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe RK35xx vendor kernel configuration no longer explicitly disables memory compaction and now enables the RK630 PHY driver as a loadable module. ChangesRK35xx kernel configuration
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
Hmm... 'real-time media' is the main use-case for rk vendor kernel, isn't it? If (For a typical non-media rk35xx server, mainline is definitely better suited). |
|
In my experience it doesn't really affect anything badly, other than fixing problems when not enabled. If any latency issues exist, they are indistinguishable, at least to me. But I understand if you think it must be tested somehow first. Maybe the jellyfin magicians will know. I agree that mainline is better for non-media uses. But it seemed to have been a purely theoretical preventive measure by Rockchip. I can test it on an RK3566, maybe a slower board could be a bit more revealing. |
|
I can test a bit with Frigate NVR -- I've a setup that does rkmpp mjpeg->hevc transcode on the way in, then hevc->frames for NPU detection, all based on a single 1080p@30 webcam. I will pick this and report back in a few days |
|
Thank you! |
I've been running with this PR for a few days in this setup and couldn't notice any change at all. The machine is not under memory pressure, so I think my tests are inconclusive. Sincerely I'd just merge and keep an ear up for possible trouble... |
|
✅ This PR has been reviewed and approved — all set for merge! |
Description
The motivation for this change is that memory compaction is a useful feature, and it is disabled on the Rockchip vendor kernel as a stale remnant from the 32-bit era.
Here is some context:
rockchip-linux/kernel@6fd9def
rockchip-linux/kernel@45cee0c
Compaction was probably not enabled to guard against some minimal latency issues in case of real-time media processing (which is Rockchip's intended use case), but it causes problems with memory management under pressure. If running the board as a server, this is a must-have. In my experience, running a Rock 5B with some memory regions masked due to physical degradation, it completely alleviated out of memory issues. It is enabled on the mainline kernel and many other vendor kernels.
Also, RK630, which is needed for some Ethernet ports on lower end Rockchip boards is missing; adding it to the config does not hurt anything.
How Has This Been Tested?
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes