From 3e98b30178c49ae530aa4498c0ee3d4b524a2dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavol=20=C5=BD=C3=A1=C4=8Dik?= Date: Thu, 22 Aug 2024 14:30:28 +0200 Subject: [PATCH] Parse no_turbo cpu plugin option using commands.get_bool The no_turbo knob only recognizes 0 or 1, so we have to convert the option value defined in the profile to an integer if necessary. Related: #630 Resolves: RHEL-51760 --- tuned/plugins/plugin_cpu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py index 50ccef43..c4cd84d3 100644 --- a/tuned/plugins/plugin_cpu.py +++ b/tuned/plugins/plugin_cpu.py @@ -397,8 +397,8 @@ def _instance_apply_static(self, instance): instance.options["max_perf_pct"]) self._max_perf_pct_save = self._getset_intel_pstate_attr( "max_perf_pct", new_value) - new_value = self._variables.expand( - instance.options["no_turbo"]) + new_value = self._cmd.get_bool(self._variables.expand( + instance.options["no_turbo"])) self._no_turbo_save = self._getset_intel_pstate_attr( "no_turbo", new_value)