From 66b247a7e9119796a40a159b7f7e4d70d529ad63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 2 Jul 2018 23:14:52 +0200 Subject: [PATCH] cpu-partitioning: Modify irqbalance config regardless of defirqaffinity exit code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the irqbalance config was not modified if setting the affinity of at least one IRQ failed. That does not make much sense to me - it can result in irqbalance assigning isolated CPUs to IRQs, even if it can be prevented. Even if affinity cannot be changed for any of the present IRQs, hypothetically it can happen (I think) that new hardware is hotplugged, and the affinity of its IRQ can be changed. So let's always modify the irqbalance config for good measure. Signed-off-by: Ondřej Lysoněk --- profiles/cpu-partitioning/script.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/profiles/cpu-partitioning/script.sh b/profiles/cpu-partitioning/script.sh index fe725ca..6d29fe7 100755 --- a/profiles/cpu-partitioning/script.sh +++ b/profiles/cpu-partitioning/script.sh @@ -39,10 +39,9 @@ start() { mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev" cp /etc/systemd/system.conf "${TUNED_tmpdir}/etc/systemd/" cp 00-tuned-pre-udev.sh "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev/" - if python /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded"; then - sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance - echo "IRQBALANCE_BANNED_CPUS=$TUNED_isolated_cpumask" >>/etc/sysconfig/irqbalance - fi + python /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded" + sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance + echo "IRQBALANCE_BANNED_CPUS=$TUNED_isolated_cpumask" >>/etc/sysconfig/irqbalance setup_kvm_mod_low_latency disable_ksm