From 38d10742e518aa95773f55ef98ba23d6f884e31f Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Mon, 18 Mar 2024 16:37:23 +0000 Subject: [PATCH] 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 +}