Marcus Meissner
9f4e1202ba
- Update to version 2.8.0: * builtin functions: parser not traceback if func expands to empty string * systemd: added support for older systemd CPUAffinity syntax * scheduler: do not traceback if process dissapears during enumeration * scheduler: fix more python-linux-procfs tracebacks * plugin_net: Fix invocation of execute() * cpu-partitioning: use tuna for cores isolation * builtin functions: add strip * bootloader: workaround for adding tuned_initrd to new kernels on restart * new release (2.8.0) + Add Patch: Fix category in desktop file for tuned-gui (fix-desktop-category.patch) + Add Patch: Remove unnecessary shebangs (remove-unnecessary-shebangs.patch) + Add Patch: Fix file permission for glade file (fix-glade-file-permission.patch) + Add rpmlintrc to silence unnecessary warnings = Modified Patches to apply with 2.8.0: - fix-allow-receive_sender-default.patch - use-cpupower-for-intel-perf-bias.patch OBS-URL: https://build.opensuse.org/request/show/510119 OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=43
63 lines
2.2 KiB
Diff
63 lines
2.2 KiB
Diff
Index: tuned-2.8.0/tuned/plugins/plugin_cpu.py
|
|
===================================================================
|
|
--- tuned-2.8.0.orig/tuned/plugins/plugin_cpu.py
|
|
+++ tuned-2.8.0/tuned/plugins/plugin_cpu.py
|
|
@@ -110,7 +110,8 @@ class CPULatencyPlugin(base.Plugin):
|
|
instance._load_monitor = None
|
|
|
|
# Check for x86_energy_perf_policy, ignore if not available / supported
|
|
- self._check_energy_perf_bias()
|
|
+ if self._has_cpupower is False:
|
|
+ self._check_energy_perf_bias()
|
|
# Check for intel_pstate
|
|
self._check_intel_pstate()
|
|
else:
|
|
@@ -262,7 +263,17 @@ class CPULatencyPlugin(base.Plugin):
|
|
if not self._is_cpu_online(device):
|
|
log.debug("%s is not online, skipping" % device)
|
|
return None
|
|
- if self._has_energy_perf_bias:
|
|
+ if self._has_cpupower is True:
|
|
+ bias_str = str(energy_perf_bias)
|
|
+ if bias_str == "performance":
|
|
+ bias_str = "0"
|
|
+ elif bias_str == "powersave":
|
|
+ bias_str = "15"
|
|
+ elif bias_str == "normal":
|
|
+ bias_str = "6"
|
|
+ cpu_id = device.lstrip("cpu")
|
|
+ self._cmd.execute(["cpupower", "-c", cpu_id, "set", "-b", bias_str])
|
|
+ elif self._has_energy_perf_bias:
|
|
if not sim:
|
|
cpu_id = device.lstrip("cpu")
|
|
log.info("setting energy_perf_bias '%s' on cpu '%s'" % (energy_perf_bias, device))
|
|
@@ -290,14 +301,21 @@ class CPULatencyPlugin(base.Plugin):
|
|
if not self._is_cpu_online(device):
|
|
log.debug("%s is not online, skipping" % device)
|
|
return None
|
|
- if self._has_energy_perf_bias:
|
|
+ if self._has_cpupower is True:
|
|
+ cpu_id = device.lstrip("cpu")
|
|
+ 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"])
|
|
- if retcode == 0:
|
|
- for line in lines.splitlines():
|
|
- l = line.split()
|
|
- if len(l) == 2:
|
|
- energy_perf_bias = self._energy_perf_policy_to_human(l[1])
|
|
- break
|
|
+ else:
|
|
+ return None
|
|
+ if retcode == 0:
|
|
+ for line in lines.splitlines():
|
|
+ if line.startswith("analyzing CPU"):
|
|
+ continue
|
|
+ l = line.split()
|
|
+ if len(l) == 2:
|
|
+ energy_perf_bias = l[1]
|
|
+ break
|
|
|
|
return energy_perf_bias
|