diff --git a/tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch b/tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch index cd544a8..78600c1 100644 --- a/tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch +++ b/tuned-2.4.0-use_cpupower_for_intel_perf_bias.patch @@ -1,8 +1,8 @@ -Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py +Index: tuned-2.4.1/tuned/plugins/plugin_cpu.py =================================================================== ---- tuned-2.3.0.orig/tuned/plugins/plugin_cpu.py -+++ tuned-2.3.0/tuned/plugins/plugin_cpu.py -@@ -91,7 +91,8 @@ +--- tuned-2.4.1.orig/tuned/plugins/plugin_cpu.py ++++ tuned-2.4.1/tuned/plugins/plugin_cpu.py +@@ -91,7 +91,8 @@ class CPULatencyPlugin(base.Plugin): # Check for cpupower, use workaround if not available self._check_cpupower() # Check for x86_energy_perf_policy, ignore if not available / supported @@ -12,7 +12,7 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py # Check for intel_pstate self._check_intel_pstate() else: -@@ -207,7 +208,17 @@ +@@ -207,7 +208,17 @@ class CPULatencyPlugin(base.Plugin): @command_set("energy_perf_bias", per_device=True) def _set_energy_perf_bias(self, energy_perf_bias, device): @@ -26,19 +26,19 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py + elif bias_str == "normal": + bias_str = "6" + cpu_id = device.lstrip("cpu") -+ tuned.utils.commands.execute(["cpupower", "-c", cpu_id, "set", "-b", bias_str]) ++ self._cmd.execute(["cpupower", "-c", cpu_id, "set", "-b", bias_str]) + elif self._has_energy_perf_bias: log.info("setting energy_perf_bias '%s' on cpu '%s'" % (energy_perf_bias, device)) cpu_id = device.lstrip("cpu") self._cmd.execute(["x86_energy_perf_policy", "-c", cpu_id, str(energy_perf_bias)]) -@@ -215,14 +226,21 @@ +@@ -215,14 +226,21 @@ class CPULatencyPlugin(base.Plugin): @command_get("energy_perf_bias") def _get_energy_perf_bias(self, device): energy_perf_bias = None - if self._has_energy_perf_bias: + if self._has_cpupower is True: + cpu_id = device.lstrip("cpu") -+ retcode, lines = tuned.utils.commands.execute(["cpupower", "-c", cpu_id, "info", "-b"]) ++ retcode, lines = self._cmd.execute(["cpupower", "-c", cpu_id, "info", "-b"]) + elif self._has_energy_perf_bias: cpu_id = device.lstrip("cpu") retcode, lines = self._cmd.execute(["x86_energy_perf_policy", "-c", cpu_id, "-r"]) @@ -48,7 +48,7 @@ Index: tuned-2.3.0/tuned/plugins/plugin_cpu.py - if len(l) == 2: - energy_perf_bias = l[1] - break -+ else: ++ else: + return None + if retcode == 0: + for line in lines.splitlines(): diff --git a/tuned.changes b/tuned.changes index 1d0c7dc..896b48f 100644 --- a/tuned.changes +++ b/tuned.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 10 12:08:42 UTC 2015 - bwiedemann@suse.com + +- fix syntax (bnc#937647) + ------------------------------------------------------------------- Mon Jan 5 15:07:22 UTC 2015 - p.drouand@gmail.com diff --git a/tuned.spec b/tuned.spec index a9d81a0..af2255f 100644 --- a/tuned.spec +++ b/tuned.spec @@ -1,7 +1,7 @@ # # spec file for package tuned # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed