Accepting request 657143 from home:trenn:branches:Base:System

- Go for 2.10.0 full version in _service (even this is rc1)
  bsc#1071436
  Latest included git commit:
  commit 3722b151920dc20735dc15cbd45aed7b573fdfc2
  Date:   Wed Nov 21 14:21:32 2018 +0100
  Still keep the old git version parameter commented out, maybe
  I need this again.
- Since cpupower also has perf_bias binary, the cpupower call to
  switch this has been reverted to lower maintenance overhead
D    check_for_cpupower.patch
D    use-cpupower-for-intel-perf-bias.patch
- Update to version 2.10.0:
  * Add range feature for cpu exclusion
  * Disable KSM only once, re-enable it only on full rollback
  * Add log message for unsupported parameters in plugin_net
  * Add missing feature parameters aliases to plugin_net
  * Make virtual-host identical to latency-performance

OBS-URL: https://build.opensuse.org/request/show/657143
OBS-URL: https://build.opensuse.org/package/show/Base:System/tuned?expand=0&rev=51
This commit is contained in:
Thomas Renninger 2018-12-11 11:33:23 +00:00 committed by Git OBS Bridge
parent c5b77f0851
commit 3cd1aeceb6
8 changed files with 34 additions and 92 deletions

View File

@ -2,7 +2,10 @@
<service name="tar_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/redhat-performance/tuned</param>
<!--
<param name="versionformat">2.9.0+git%cd.%h</param>
-->
<param name="versionformat">2.10.0</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">

View File

@ -1,20 +0,0 @@
Index: tuned-2.9.0+git20180328.d25e8b8/tuned/plugins/plugin_cpu.py
===================================================================
--- tuned-2.9.0+git20180328.d25e8b8.orig/tuned/plugins/plugin_cpu.py
+++ tuned-2.9.0+git20180328.d25e8b8/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(CPULatencyPlugin, 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

3
tuned-2.10.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f409c066754d23ae27d40fa34b36f2f5de66b4188f79b09cd5a9ebc0a99f386
size 132068

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85e642920c4dfe25183d4c18d4b50dc52f3e550f76b2e882fcb5d6481a74c82d
size 123800

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Thu Nov 22 11:42:42 UTC 2018 - trenn@suse.de
- Go for 2.10.0 full version in _service (even this is rc1)
bsc#1071436
Latest included git commit:
commit 3722b151920dc20735dc15cbd45aed7b573fdfc2
Date: Wed Nov 21 14:21:32 2018 +0100
Still keep the old git version parameter commented out, maybe
I need this again.
- Since cpupower also has perf_bias binary, the cpupower call to
switch this has been reverted to lower maintenance overhead
D check_for_cpupower.patch
D use-cpupower-for-intel-perf-bias.patch
- Update to version 2.10.0:
* Add range feature for cpu exclusion
* Disable KSM only once, re-enable it only on full rollback
* Add log message for unsupported parameters in plugin_net
* Add missing feature parameters aliases to plugin_net
* Make virtual-host identical to latency-performance
-------------------------------------------------------------------
Fri Apr 06 09:57:36 UTC 2018 - tchvatal@suse.com

View File

@ -1,3 +1,5 @@
addFilter("W: files-duplicate /etc/tuned/realtime-virtual-host-variables.conf /etc/tuned/realtime-virtual-guest-variables.conf")
addFilter("W: zero-length /etc/tuned/active_profile")
addFilter("W: zero-length /etc/tuned/profile_mode")
addFilter("W: obsolete-not-provided pm-profiler")
addFilter("W: files-duplicate /etc/tuned/realtime-virtual-guest-variables.conf /etc/tuned/realtime-virtual-host-variables.conf")

View File

@ -12,13 +12,13 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{!?_tmpfilesdir:%global _tmpfilesdir %{_libexecdir}/tmpfiles.d}
Name: tuned
Version: 2.9.0+git20180328.d25e8b8
Version: 2.10.0
Release: 0
Summary: A dynamic adaptive system tuning daemon
License: GPL-2.0-or-later
@ -30,17 +30,14 @@ Source1: tuned.rpmlintrc
# PATCH-FIX-OPENSUSE fix-allow-receive_sender-default.patch <allow receive_sender="com.redhat.com"/> allow receive_* is normally
# not needed as that is the default --<p.drouand@gmail.com>
Patch0: fix-allow-receive_sender-default.patch
# PATCH-FIX-OPENSUSE use-cpupower-for-intel-perf-bias.patch --use cpupower instead of energy class
Patch1: use-cpupower-for-intel-perf-bias.patch
# PATCH-FIX-OPENSUSE check_for_cpupower.patch -- check for cpupower binary too
Patch5: check_for_cpupower.patch
# Do not own standard directories
BuildRequires: bash-completion
BuildRequires: desktop-file-utils
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: pkgconfig(systemd)
Requires: cpupower
# need perf_bias now
Requires: cpupower >= 4.19
Requires: ethtool
Requires: gawk
Requires: hdparm
@ -227,6 +224,7 @@ sed -i 's|.*/\([^/]\+\)/[^\.]\+\.conf|\1|' %{_sysconfdir}/tuned/active_profile
%{_mandir}/man5/tuned*
%{_mandir}/man7/tuned-profiles-cpu-partitioning.7%{?ext_man}
%{_mandir}/man7/tuned-profiles.7%{?ext_man}
%{_mandir}/man7/tuned-profiles-mssql.7%{?ext_man}
%{_mandir}/man8/tuned*
%dir %{_datadir}/tuned
%ghost %dir /run/tuned

View File

@ -1,62 +0,0 @@
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