From 2157ba44e94f5e98240a4b5032f73f69a2f4e200 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:34:41 +0000 Subject: import tuned-2.9.0-1.el7 --- diff --git a/.gitignore b/.gitignore index 8242f96..ae82a2a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/tuned-2.8.0.tar.bz2 +SOURCES/tuned-2.9.0.tar.gz diff --git a/.tuned.metadata b/.tuned.metadata index 7104979..f75b57b 100644 --- a/.tuned.metadata +++ b/.tuned.metadata @@ -1 +1 @@ -ab82f13f867aeb64e83d2fd7dcea883ce4e66f34 SOURCES/tuned-2.8.0.tar.bz2 +83a693e12c542735bb10db4a10aeeee60ffacfb0 SOURCES/tuned-2.9.0.tar.gz diff --git a/SOURCES/tuned-2.8.0-change-force-latency.patch b/SOURCES/tuned-2.8.0-change-force-latency.patch deleted file mode 100644 index 0f3c9ef..0000000 --- a/SOURCES/tuned-2.8.0-change-force-latency.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/profiles/sap-hana-vmware/tuned.conf b/profiles/sap-hana-vmware/tuned.conf -index 9378219..99aa137 100644 ---- a/profiles/sap-hana-vmware/tuned.conf -+++ b/profiles/sap-hana-vmware/tuned.conf -@@ -7,7 +7,7 @@ summary=Optimize for SAP running inside a VMware guest - include=throughput-performance - - [cpu] --force_latency=1 -+force_latency=70 - - [vm] - transparent_hugepages=never -diff --git a/profiles/sap-hana/tuned.conf b/profiles/sap-hana/tuned.conf -index 42f18e0..b11fe17 100644 ---- a/profiles/sap-hana/tuned.conf -+++ b/profiles/sap-hana/tuned.conf -@@ -7,7 +7,7 @@ summary=Optimize for SAP - include=throughput-performance - - [cpu] --force_latency=1 -+force_latency=70 - - [vm] - transparent_hugepages=never diff --git a/SOURCES/tuned-2.8.0-improve-reboot-check.patch b/SOURCES/tuned-2.8.0-improve-reboot-check.patch deleted file mode 100644 index f22ac63..0000000 --- a/SOURCES/tuned-2.8.0-improve-reboot-check.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff --git a/tuned.service b/tuned.service -index fcb3fa0..c59e3a9 100644 ---- a/tuned.service -+++ b/tuned.service -@@ -1,6 +1,6 @@ - [Unit] - Description=Dynamic System Tuning Daemon --After=syslog.target systemd-sysctl.service network.target -+After=syslog.target systemd-sysctl.service network.target dbus.service - Requires=dbus.service polkit.service - Conflicts=cpupower.service - -diff --git a/tuned/daemon/daemon.py b/tuned/daemon/daemon.py -index b7db721..f78ec5a 100644 ---- a/tuned/daemon/daemon.py -+++ b/tuned/daemon/daemon.py -@@ -6,6 +6,7 @@ from tuned.exceptions import TunedException - from tuned.profiles.exceptions import InvalidProfileException - import tuned.consts as consts - from tuned.utils.commands import commands -+import re - - log = tuned.logs.get() - -@@ -98,6 +99,13 @@ class Daemon(object): - self._application._dbus_exporter.send_signal(consts.DBUS_SIGNAL_PROFILE_CHANGED, profile_name, result, errstr) - return errstr - -+ def _system_shutting_down(self): -+ retcode, out = self._cmd.execute(["systemctl", "is-system-running"], no_errors = [0]) -+ if out[:8] == "stopping": -+ return True -+ retcode, out = self._cmd.execute(["systemctl", "list-jobs"], no_errors = [0]) -+ return re.search(r"\b(shutdown|reboot|halt|poweroff)\.target.*start", out) is not None -+ - def _thread_code(self): - if self._profile is None: - raise TunedException("Cannot start the daemon without setting a profile.") -@@ -143,13 +151,11 @@ class Daemon(object): - # stopped by user and in such case do full cleanup, without systemd never - # do full cleanup - full_rollback = False -- retcode, out = self._cmd.execute(["systemctl", "is-system-running"], no_errors = [0]) -- if retcode >= 0: -- if out[:8] == "stopping": -- log.info("terminating Tuned due to system shutdown / reboot") -- else: -- log.info("terminating Tuned, rolling back all changes") -- full_rollback = True -+ if self._system_shutting_down(): -+ log.info("terminating Tuned due to system shutdown / reboot") -+ else: -+ log.info("terminating Tuned, rolling back all changes") -+ full_rollback = True - if self._daemon: - self._unit_manager.stop_tuning(full_rollback) - self._unit_manager.destroy_all() diff --git a/SOURCES/tuned-2.8.0-increase-dbus-timeout.patch b/SOURCES/tuned-2.8.0-increase-dbus-timeout.patch deleted file mode 100644 index 0060988..0000000 --- a/SOURCES/tuned-2.8.0-increase-dbus-timeout.patch +++ /dev/null @@ -1,49 +0,0 @@ -From bfab9d8d22adb9a4382a94142782906674c1bf59 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= -Date: Thu, 7 Sep 2017 16:03:59 +0200 -Subject: [PATCH 1/2] tuned-adm: Increase DBus call timeout to 40 seconds -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Increase timeout for DBus method calls in tuned-adm to 40 seconds. -This is meant to prevent simultaneous timeouts in tuned-adm and -the tuned daemon. - -Previously it could happen, that e.g. - tuned-adm profile -was executed, issuing a DBus call to the tuned daemon, -then in response the tuned daemon would issue a DBus -call to Polkit in order to authorize the profile switch request, and -this call would time out. The call to Polkit would time out after the -default DBus timeout of 25 seconds and simultaneously the tuned-adm's -call to tuned daemon would also time out, because the same default -timeout was used. After that, if the fallback authorization method -in tuned daemon succeeded, the daemon would start applying the new -profile, and at the same time tuned-adm would use the fallback method, -which is restarting tuned (systemctl restart tuned). This could -potentially lead to all sorts of race conditions. Let's avoid that -by increasing the timeout in tuned-adm, so that tuned has time -to apply a profile after a failed Polkit call. - -Related: rhbz#1475571 - -Signed-off-by: Ondřej Lysoněk ---- - tuned/admin/dbus_controller.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tuned/admin/dbus_controller.py b/tuned/admin/dbus_controller.py -index fa46a0d..8567e34 100644 ---- a/tuned/admin/dbus_controller.py -+++ b/tuned/admin/dbus_controller.py -@@ -67,7 +67,7 @@ def _call(self, method_name, *args, **kwargs): - - try: - method = self._interface.get_dbus_method(method_name) -- return method(*args, **kwargs) -+ return method(*args, timeout=40) - except dbus.exceptions.DBusException as dbus_exception: - err_str = "DBus call to Tuned daemon failed" - if self._debug: - diff --git a/SOURCES/tuned-2.8.0-realtime-priorities-update.patch b/SOURCES/tuned-2.8.0-realtime-priorities-update.patch deleted file mode 100644 index bc75e39..0000000 --- a/SOURCES/tuned-2.8.0-realtime-priorities-update.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 1ab378cc4a4372ca031bb765f656ab463b28af88 Mon Sep 17 00:00:00 2001 -From: Luiz Capitulino -Date: Fri, 19 May 2017 15:10:19 -0400 -Subject: [PATCH] realtime-virtual-guest: re-assign kernel thread priorities - -From 63e5ebfe0c71c5e6d0613c4d8327b2a6f3fba7ba Mon Sep 17 00:00:00 2001 -From: Luiz Capitulino -Date: Fri, 19 May 2017 14:42:06 -0400 -Subject: - -The realtime guest profile uses the RT kernel default priority -assignment for the ksoftird, rcuc, and ktimersoftd kernel threads, -which is: - - 17 FF 2 [rcuc/1] * - 19 FF 1 [ktimersoftd/1] * - 20 TS - [ksoftirqd/1] * - -This doesn't allow running a PMD thread with fifo:1 in the -guest, since this will starve ktimersoftd and ksoftirqd if -those threads ever become runnable. - -The solution is to use the same priority assigment we use -in the host where we've been running PMD threads with -fifo:1 priorities without problems. This assignment is: - - 151 FF 4 [rcuc/15] * - 153 FF 3 [ktimersoftd/15] * - 154 FF 2 [ksoftirqd/15] * - -This patch just copies the [scheduler] section from the -host profile. - -Resolves: rhbz#1452357 - -Signed-off-by: Luiz Capitulino ---- - profiles/realtime-virtual-guest/tuned.conf | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf -index 71085a8..0992fbd 100644 ---- a/profiles/realtime-virtual-guest/tuned.conf -+++ b/profiles/realtime-virtual-guest/tuned.conf -@@ -20,6 +20,20 @@ isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}} - # Fail if isolated_cores contains CPUs which are not present - assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}} - -+[scheduler] -+# group.group_name=rule_priority:scheduler_policy:scheduler_priority:core_affinity_in_hex:process_name_regex -+# for i in `pgrep ksoftirqd` ; do grep Cpus_allowed_list /proc/$i/status ; done -+group.ksoftirqd=0:f:2:*:ksoftirqd.* -+ -+# for i in `pgrep rcuc` ; do grep Cpus_allowed_list /proc/$i/status ; done -+group.rcuc=0:f:4:*:rcuc.* -+ -+# for i in `pgrep rcub` ; do grep Cpus_allowed_list /proc/$i/status ; done -+group.rcub=0:f:4:*:rcub.* -+ -+# for i in `pgrep ktimersoftd` ; do grep Cpus_allowed_list /proc/$i/status ; done -+group.ktimersoftd=0:f:3:*:ktimersoftd.* -+ - [script] - script=${i:PROFILE_DIR}/script.sh - diff --git a/SOURCES/tuned-2.8.0-realtime-skew-tick-and-inheritance.patch b/SOURCES/tuned-2.8.0-realtime-skew-tick-and-inheritance.patch deleted file mode 100644 index 58706f8..0000000 --- a/SOURCES/tuned-2.8.0-realtime-skew-tick-and-inheritance.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf -index 04d7b5f..71085a8 100644 ---- a/profiles/realtime-virtual-guest/tuned.conf -+++ b/profiles/realtime-virtual-guest/tuned.conf -@@ -24,4 +24,4 @@ assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_ex - script=${i:PROFILE_DIR}/script.sh - - [bootloader] --cmdline=isolcpus=${isolated_cores} nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} intel_pstate=disable nosoftlockup -+cmdline_rvg+=nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} -diff --git a/profiles/realtime-virtual-host/tuned.conf b/profiles/realtime-virtual-host/tuned.conf -index e01a99c..d7404d0 100644 ---- a/profiles/realtime-virtual-host/tuned.conf -+++ b/profiles/realtime-virtual-host/tuned.conf -@@ -55,4 +55,4 @@ group.ktimersoftd=0:f:3:*:ktimersoftd.* - script=${i:PROFILE_DIR}/script.sh - - [bootloader] --cmdline=isolcpus=${isolated_cores} nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} intel_pstate=disable nosoftlockup -+cmdline_rvh+=nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} -diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf -index f152237..9794cd6 100644 ---- a/profiles/realtime/tuned.conf -+++ b/profiles/realtime/tuned.conf -@@ -36,11 +36,7 @@ kernel.timer_migration = 0 - /sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1 - - [bootloader] --# lscpu | grep ^NUMA --# NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22 --# NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23 -- --cmdline=isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup -+cmdline=isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup skew_tick=1 - - [script] - script = ${i:PROFILE_DIR}/script.sh diff --git a/SOURCES/tuned-2.8.0-workaround-for-old-pyudev.patch b/SOURCES/tuned-2.8.0-workaround-for-old-pyudev.patch deleted file mode 100644 index eebcc1c..0000000 --- a/SOURCES/tuned-2.8.0-workaround-for-old-pyudev.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 8af58432afeec89467699b36d5e3d9fcc2120cc9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= -Date: Fri, 5 May 2017 13:51:05 +0200 -Subject: [PATCH] inventory: added workaround for pyudev < 0.18 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This is needed for e.g. RHEL-7.4. - -Related: rhbz#1251240 - -Signed-off-by: Jaroslav Škarvada ---- - tuned/hardware/inventory.py | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/tuned/hardware/inventory.py b/tuned/hardware/inventory.py -index 7a24348..8c5117d 100644 ---- a/tuned/hardware/inventory.py -+++ b/tuned/hardware/inventory.py -@@ -30,7 +30,11 @@ class Inventory(object): - - def get_device(self, subsystem, sys_name): - """Get a pyudev.Device object for the sys_name (e.g. 'sda').""" -- return pyudev.Devices.from_name(self._udev_context, subsystem, sys_name) -+ try: -+ return pyudev.Devices.from_name(self._udev_context, subsystem, sys_name) -+ # workaround for pyudev < 0.18 -+ except AttributeError: -+ return pyudev.Device.from_name(self._udev_context, subsystem, sys_name) - - def get_devices(self, subsystem): - """Get list of devices on a given subsystem.""" --- -2.9.3 - diff --git a/SPECS/tuned.spec b/SPECS/tuned.spec index 898757f..ff40cc3 100644 --- a/SPECS/tuned.spec +++ b/SPECS/tuned.spec @@ -1,9 +1,15 @@ +#%%global prerelease rc +#%%global prereleasenum 2 + +%global prerel1 %{?prerelease:.%{prerelease}%{prereleasenum}} +%global prerel2 %{?prerelease:-%{prerelease}.%{prereleasenum}} + Summary: A dynamic adaptive system tuning daemon Name: tuned -Version: 2.8.0 -Release: 5%{?dist}.2 +Version: 2.9.0 +Release: 1%{?prerel1}%{?dist} License: GPLv2+ -Source: https://jskarvad.fedorapeople.org/tuned/download/tuned-%{version}.tar.bz2 +Source: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel1}.tar.gz URL: http://www.tuned-project.org/ BuildArch: noarch BuildRequires: python, systemd, desktop-file-utils @@ -13,15 +19,9 @@ Requires(postun): systemd Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev # kernel-tools, hdparm dependencies are not met on s390 Requires: virt-what, python-configobj, ethtool, gawk -Requires: util-linux, python-perf, dbus, polkit -Requires: python-linux-procfs, python-schedutils +Requires: util-linux, python-perf, dbus, polkit, python-linux-procfs +Requires: python-schedutils Patch0: tuned-2.8.0-gtk-3.8.patch -Patch1: tuned-2.8.0-workaround-for-old-pyudev.patch -Patch2: tuned-2.8.0-realtime-skew-tick-and-inheritance.patch -Patch3: tuned-2.8.0-realtime-priorities-update.patch -Patch4: tuned-2.8.0-change-force-latency.patch -Patch5: tuned-2.8.0-increase-dbus-timeout.patch -Patch6: tuned-2.8.0-improve-reboot-check.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -134,7 +134,6 @@ Additional tuned profile(s) targeted to Network Function Virtualization (NFV). %package profiles-cpu-partitioning Summary: Additional tuned profile(s) optimized for CPU partitioning Requires: %{name} = %{version} -Requires: tuna %description profiles-cpu-partitioning Additional tuned profile(s) optimized for CPU partitioning. @@ -148,14 +147,9 @@ Additional tuned profiles mainly for backward compatibility with tuned 1.0. It can be also used to fine tune your system for specific scenarios. %prep -%setup -q +%setup -q -n %{name}-%{version}%{?prerel2} %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 + %build @@ -182,6 +176,8 @@ touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf # validate desktop file desktop-file-validate %{buildroot}%{_datadir}/applications/tuned-gui.desktop +mkdir -p %{buildroot}%{_sysconfdir}/tuned/recommend.d + %post %systemd_post tuned.service @@ -200,6 +196,8 @@ fi if [ "$1" == 0 ]; then # clear persistent storage rm -f %{_var}/lib/tuned/* +# clear temporal storage + rm -f /run/tuned/* fi @@ -263,6 +261,7 @@ fi %exclude %{_sysconfdir}/tuned/realtime-virtual-guest-variables.conf %exclude %{_sysconfdir}/tuned/realtime-virtual-host-variables.conf %exclude %{_sysconfdir}/tuned/cpu-partitioning-variables.conf +%exclude %{_sysconfdir}/tuned/sap-hana-vmware-variables.conf %exclude %{_prefix}/lib/tuned/default %exclude %{_prefix}/lib/tuned/desktop-powersave %exclude %{_prefix}/lib/tuned/laptop-ac-powersave @@ -282,9 +281,11 @@ fi %exclude %{_prefix}/lib/tuned/cpu-partitioning %{_prefix}/lib/tuned %dir %{_sysconfdir}/tuned +%dir %{_sysconfdir}/tuned/recommend.d %dir %{_libexecdir}/tuned %{_libexecdir}/tuned/defirqaffinity* %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/active_profile +%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/profile_mode %config(noreplace) %{_sysconfdir}/tuned/tuned-main.conf %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/tuned/bootcmdline %{_sysconfdir}/dbus-1/system.d/com.redhat.tuned.conf @@ -337,6 +338,7 @@ fi %files profiles-sap-hana %defattr(-,root,root,-) +%config(noreplace) %{_sysconfdir}/tuned/sap-hana-vmware-variables.conf %{_prefix}/lib/tuned/sap-hana %{_prefix}/lib/tuned/sap-hana-vmware %{_mandir}/man7/tuned-profiles-sap-hana.7* @@ -392,13 +394,58 @@ fi %{_mandir}/man7/tuned-profiles-compat.7* %changelog -* Mon Oct 30 2017 Jaroslav Škarvada - 2.8.0-5.2 -- fixed profile application from cloud-init - resolves: rhbz#1507564 +* Sun Oct 29 2017 Jaroslav Škarvada - 2.9.0-1 +- new release + - rebased tuned to latest upstream + related: rhbz#1467576 -* Mon Oct 23 2017 Jaroslav Škarvada - 2.8.0-5.1 -- sap-hana: change force_latency to 70 - resolves: rhbz#1505166 +* Fri Oct 20 2017 Jaroslav Škarvada - 2.9.0-0.2.rc2 +- new release + - rebased tuned to latest upstream + related: rhbz#1467576 + - fixed expansion of the variables in the 'devices' section + related: rhbz#1490399 + - cpu-partitioning: add no_rebalance_cores= option + resolves: rhbz#1497182 + +* Thu Oct 12 2017 Jaroslav Škarvada - 2.9.0-0.1.rc1 +- new release + - rebased tuned to latest upstream + resolves: rhbz#1467576 + - added recommend.d functionality + resolves: rhbz#1459146 + - recommend: added support for matching of processes + resolves: rhbz#1461838 + - cpu-partitioning: used tuned instead of tuna for cores isolation + resolves: rhbz#1442229 + - bootloader: splitted string for removal from cmdline + resolves: rhbz#1461279 + - network-latency: added skew_tick=1 kernel command line parameter + resolves: rhbz#1451073 + - bootloader: accepted only certain values for initrd_remove_dir + resolves: rhbz#1455161 + - increased udev monitor buffer size, made it configurable + resolves: rhbz#1442306 + - bootloader: don't add nonexistent overlay image to grub.cfg + resolves: rhbz#1454340 + - plugin_cpu: don't log error in execute() if EPB is not supported + resolves: rhbz#1443182 + - sap-hana: fixed description of the sap-hana profiles + resolves: rhbz#1482005 + - plugin_systemd: on full_rollback notify about need of initrd regeneration + resolves: rhbz#1469258 + - don't log errors about missing files on verify with ignore_missing set + resolves: rhbz#1451435 + - plugin_scheduler: improved logging + resolves: rhbz#1474961 + - improved checking if we are rebooting or not + resolves: rhbz#1475571 + - started dbus exports after a profile is applied + resolves: rhbz#1443142 + - sap-hana: changed force_latency to 70 + resolves: rhbz#1501252 + - plugin_video: added support for the 'dpm' power method + - list available profiles on 'tuned-adm profile' * Mon Jun 12 2017 Jaroslav Škarvada - 2.8.0-5 - realtime: re-assigned kernel thread priorities