Update real-time capability check for multimacd #2386
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Use more generic way to test if we can change real-time scheduling attributes.
On a kernel compiled with
CONFIG_RT_GROUP_SCHED=y
each cgroup domain which wants to use real-time scheduling would need to allocate rt_runtime_us.If you are stuck with such a kernel one can disable the limit altogether changing the kernel parameter with
sudo sysctl -w kernel.sched_rt_runtime_us=-1
orecho "kernel.sched_rt_runtime_us = -1" | sudo tee /etc/sysctl.d/10-disable-rt-group-limit.conf
to make it permanent.The previous check for real-time capability fails in this case, because it only checks for rt_runtime_us > 0 in the cgroup settings which don't reflect the kernel parameter.
Related Issue
home-assistant/operating-system#1235
home-assistant/operating-system#2168
#1191
Types of changes
Alternate Designs
None considered
Possible Drawbacks
Not that I'm aware of
Verification Process
Implemented and tested locally on a Radxa 4SE with Debian Bullseye and Home Assistant supervised install
Release Notes
N/A
Contributing checklist