check for `cpupower` binary and set attribute correctly (bsc#1055070) OBS-URL: https://build.opensuse.org/request/show/542201 OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=46
21 lines
760 B
Diff
21 lines
760 B
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
|
|
@@ -18,12 +18,15 @@ class CPULatencyPlugin(base.Plugin):
|
|
Plugin for tuning CPU options. Powersaving, governor, required latency, etc.
|
|
"""
|
|
|
|
+ CPUPOWER_PATH = "/usr/bin/cpupower"
|
|
+
|
|
def __init__(self, *args, **kwargs):
|
|
super(self.__class__, self).__init__(*args, **kwargs)
|
|
|
|
self._has_pm_qos = True
|
|
self._has_energy_perf_bias = True
|
|
self._has_intel_pstate = False
|
|
+ self._has_cpupower = os.path.isfile(self.CPUPOWER_PATH) and os.access(self.CPUPOWER_PATH, os.X_OK)
|
|
|
|
self._min_perf_pct_save = None
|
|
self._max_perf_pct_save = None
|