From acc1427a4f122bb3ccd8f61365d70e32bc98244f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Mon, 21 Aug 2017 12:34:27 +0200 Subject: [PATCH] cpu: Don't log error in execute() if EPB is not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don't log error in commands.execute() if MSR_IA32_ENERGY_PERF_BIAS is not supported. A message with level WARN is already logged afterwards: WARNING tuned.plugins.plugin_cpu: your CPU doesn't support MSR_IA32_ENERGY_PERF_BIAS, ignoring CPU energy performance bias Resolves: rhbz#1443182 Signed-off-by: Ondřej Lysoněk --- tuned/plugins/plugin_cpu.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py index f761f0e..bcbaad7 100644 --- a/tuned/plugins/plugin_cpu.py +++ b/tuned/plugins/plugin_cpu.py @@ -60,7 +60,8 @@ class CPULatencyPlugin(base.Plugin): def _check_energy_perf_bias(self): self._has_energy_perf_bias = False - retcode = self._cmd.execute(["x86_energy_perf_policy", "-r"], no_errors = [errno.ENOENT])[0] + retcode_unsupported = 1 + retcode = self._cmd.execute(["x86_energy_perf_policy", "-r"], no_errors = [errno.ENOENT, retcode_unsupported])[0] if retcode == 0: self._has_energy_perf_bias = True elif retcode < 0: