From 97553260b2834e1a65b13baa1b83086f0ebb8cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 2 Jul 2018 23:14:43 +0200 Subject: [PATCH] scheduler: Set IRQ affinity only if current affinity is different MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1590937 Signed-off-by: Ondřej Lysoněk --- tuned/plugins/plugin_scheduler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tuned/plugins/plugin_scheduler.py b/tuned/plugins/plugin_scheduler.py index 4ccd059..53a74d0 100644 --- a/tuned/plugins/plugin_scheduler.py +++ b/tuned/plugins/plugin_scheduler.py @@ -580,9 +580,10 @@ class SchedulerPlugin(base.Plugin): except KeyError: continue _affinity = self._get_intersect_affinity(prev_affinity, affinity, affinity) - affinity_hex = self._cmd.cpulist2hex(_affinity) - self._set_irq_affinity(irq, affinity_hex) - irq_original.irqs[irq] = prev_affinity + if set(_affinity) != set(prev_affinity): + affinity_hex = self._cmd.cpulist2hex(_affinity) + self._set_irq_affinity(irq, affinity_hex) + irq_original.irqs[irq] = prev_affinity # default affinity prev_affinity_hex = self._cmd.read_file("/proc/irq/default_smp_affinity")