Merge pull request #1771 from flatcar/scripts

sys-fs/multipath-tools: Disable realtime scheduling for multipathd

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2024-03-19 17:41:06 +01:00
commit 1fb7528e5f
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1 @@
- Disabled real-time priority for multipathd as it prevents the cgroups2 cpu controller from working. ([flatcar/scripts#1771](https://github.com/flatcar/scripts/pull/1771))

View File

@ -0,0 +1,13 @@
cros_post_src_install_add_dropin() {
mkdir -p "${D}$(systemd_get_systemunitdir)/multipathd.service.d"
cat <<EOF >"${D}$(systemd_get_systemunitdir)/multipathd.service.d/flatcar.conf"
[Service]
# Multipathd sets itself to sched_rr with highest priority.
# Cgroups2 doesn't support realtime processes outside the root cgroup,
# if any such process exists then cpu controller can't be enabled.
# This poses a bit of a dilemma.
# Block realtime control for the process, but give it highest non-rt priority.
RestrictRealtime=yes
Nice=-20
EOF
}