From 8c1cb32a3fc6ad9aedb119ad2484e566656f34aa Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Mon, 18 Mar 2024 16:37:23 +0000 Subject: [PATCH 1/2] sys-fs/multipath-tools: Disable realtime scheduling for multipathd Add a dropin that prevents the service from controlling its own scheduling. On newer Flatcar releases, service ordering seems to have changed and multipathd is able to configure realtime scheduling before systemd tries (and fails) to enable the cpu controller. The dropin is meant to enforce sane behavior, and matches older Flatcar releases where cpu controller was enabled before multipathd tries (and fails) to configure realtime scheduling. Signed-off-by: Jeremi Piotrowski --- .../coreos/config/env/sys-fs/multipath-tools | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-fs/multipath-tools diff --git a/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-fs/multipath-tools b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-fs/multipath-tools new file mode 100644 index 0000000000..5b835efaa3 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-fs/multipath-tools @@ -0,0 +1,13 @@ +cros_post_src_install_add_dropin() { + mkdir -p "${D}$(systemd_get_systemunitdir)/multipathd.service.d" + cat <"${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 +} From bbb4760d33a27977ecd62f30135bd394d63a6728 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Tue, 19 Mar 2024 14:36:42 +0000 Subject: [PATCH 2/2] changelog: Add entry for multipath realtime change Signed-off-by: Jeremi Piotrowski --- changelog/changes/2024-03-19-multipath.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/changes/2024-03-19-multipath.md diff --git a/changelog/changes/2024-03-19-multipath.md b/changelog/changes/2024-03-19-multipath.md new file mode 100644 index 0000000000..1f01cd6e2d --- /dev/null +++ b/changelog/changes/2024-03-19-multipath.md @@ -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))