utils: fixed packaging of pmqos-static
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
7eb0ad5cdc
commit
f070213c64
6 changed files with 32 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
[cpu]
|
||||
governor=ondemand
|
||||
intel_perf_bias=normal
|
||||
|
||||
[audio]
|
||||
timeout=10
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
[cpu]
|
||||
force_latency=1
|
||||
governor=performance
|
||||
intel_perf_bias=performance
|
||||
|
||||
[vm]
|
||||
transparent_hugepages=never
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
[cpu]
|
||||
governor=ondemand
|
||||
intel_perf_bias=powersave
|
||||
|
||||
[eeepc_she]
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
[cpu]
|
||||
governor=performance
|
||||
intel_perf_bias=performance
|
||||
|
||||
[vm]
|
||||
transparent_hugepages=always
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' /etc/tuned/active_profile
|
|||
%defattr(-,root,root,-)
|
||||
%doc COPYING
|
||||
%{_bindir}/powertop2tuned
|
||||
%{_libexecdir}/tuned/
|
||||
%{_libexecdir}/tuned/pmqos-static*
|
||||
|
||||
%files utils-systemtap
|
||||
%defattr(-,root,root,-)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class CPULatencyPlugin(base.Plugin):
|
|||
"latency_high" : 1000,
|
||||
"force_latency" : None,
|
||||
"governor" : None,
|
||||
"intel_perf_bias" : None,
|
||||
}
|
||||
|
||||
def _check_cpupower(self):
|
||||
|
|
@ -143,3 +144,29 @@ class CPULatencyPlugin(base.Plugin):
|
|||
log.error("could not get current governor on cpu '%s'" % device)
|
||||
|
||||
return governor
|
||||
|
||||
@command_set("intel_perf_bias", per_device=True)
|
||||
def _set_intel_perf_bias(self, intel_perf_bias, device):
|
||||
log.info("setting intel_perf_bias '%s' on cpu '%s'" % (intel_perf_bias, device))
|
||||
cpu_id = device.lstrip("cpu")
|
||||
tuned.utils.commands.execute(["x86_energy_perf_policy", "-c", cpu_id, str(intel_perf_bias)])
|
||||
|
||||
@command_get("intel_perf_bias")
|
||||
def _get_intel_perf_bias(self, device):
|
||||
intel_perf_bias = None
|
||||
if self._has_cpupower:
|
||||
cpu_id = device.lstrip("cpu")
|
||||
retcode, lines = tuned.utils.commands.execute(["cpupower", "-c", cpu_id, "frequency-info", "-p"])
|
||||
if retcode == 0:
|
||||
for line in lines.splitlines():
|
||||
if line.startswith("analyzing"):
|
||||
continue
|
||||
l = line.split()
|
||||
if len(l) == 3:
|
||||
governor = l[2]
|
||||
break
|
||||
|
||||
if governor is None:
|
||||
log.error("could not get current governor on cpu '%s'" % device)
|
||||
|
||||
return governor
|
||||
|
|
|
|||
Loading…
Reference in a new issue