-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Disable CQE on mmc0 to fix I/O freezes on CM5 #3793
Conversation
Similarly to #3705, enabled CQE triggers I/O freezes usually on the first boot when the swapfile is being created. While we disabled it for Yellow, with #3782 the issue started to appear on generic CM5 targets with the rpi5-64 image. In the meantime it was discovered that there seems to be some relation with the ext4lazyinit task, which happens as a result of data partition resize, yet it's still unclear if the pattern of the access triggered by the concurrent FS initialization is somehow responsible, or if another factor comes in play. Disabling CQE yet makes the issue go away and serves as an acceptable workaround.
📝 WalkthroughWalkthroughThe patch addresses an issue with the Raspberry Pi Compute Module 5 (CM5) by disabling the Command Queue Engine (CQE) feature for the eMMC interface. This modification is specifically targeted at resolving system hang-ups during the first boot of Home Assistant Operating System (HAOS), particularly when initializing swap files. By commenting out the Changes
Sequence DiagramsequenceDiagram
participant Device Tree
participant eMMC
participant System Boot
Device Tree->>eMMC: Disable CQE
System Boot->>eMMC: Perform I/O Operations
Note over System Boot, eMMC: Prevent hang-ups during initialization
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
buildroot-external/board/raspberrypi/patches/linux/0003-dts-bcm2712-rpi-Disable-CQE-for-CM5-eMMC-to-work-aro.patch (1)
10-14
: Enhance commit message with additional details.While the commit message clearly explains the problem and solution, consider adding:
- Steps to reproduce the issue
- Details about the investigation performed
- Quantitative metrics about the performance impact
- Potential future directions for a permanent fix
This will help with future debugging and decision-making about reverting this workaround.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
buildroot-external/board/raspberrypi/patches/linux/0003-dts-bcm2712-rpi-Disable-CQE-for-CM5-eMMC-to-work-aro.patch
(1 hunks)
🔇 Additional comments (1)
buildroot-external/board/raspberrypi/patches/linux/0003-dts-bcm2712-rpi-Disable-CQE-for-CM5-eMMC-to-work-aro.patch (1)
24-31
: LGTM! The change looks correct and well-contained.The modification to disable CQE is minimal and targeted specifically to the CM5's eMMC interface while preserving other high-speed modes.
Let's verify this change doesn't affect other platforms:
Consider:
- Adding a comment in the device tree explaining why CQE is disabled
- Creating a tracking issue for finding a permanent solution
- Documenting this workaround in the platform's README or known issues section
✅ Verification successful
Verified: The CQE change is consistent with other platform patches
The change aligns with similar modifications in the Yellow board's device tree, where CQE is also being disabled for the eMMC interface. The impact is properly contained to bcm2712-based boards.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for other platforms that might be affected by CQE changes rg "supports-cqe" -A 5 -B 5Length of output: 5169
Similarly to #3705, enabled CQE triggers I/O freezes usually on the first boot when the swapfile is being created. While we disabled it for Yellow, with #3782 the issue started to appear on generic CM5 targets with the rpi5-64 image.
In the meantime it was discovered that there seems to be some relation with the ext4lazyinit task, which happens as a result of data partition resize, yet it's still unclear if the pattern of the access triggered by the concurrent FS initialization is somehow responsible, or if another factor comes in play. Disabling CQE yet makes the issue go away and serves as an acceptable workaround.
Summary by CodeRabbit