Browse Source

tuned package update

Signed-off-by: basebuilder_pel7x64builder0 <basebuilder@powerel.org>
master
basebuilder_pel7x64builder0 6 years ago
parent
commit
1f9e5d2ae3
  1. 100
      SOURCES/tuned-2.10.0-gtk-3.8.patch
  2. 94
      SOURCES/tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch
  3. 104
      SOURCES/tuned-2.10.0-use-online-cpus.patch
  4. 81
      SPECS/tuned.spec

100
SOURCES/tuned-2.10.0-gtk-3.8.patch

@ -0,0 +1,100 @@ @@ -0,0 +1,100 @@
diff --git a/tuned-gui.glade b/tuned-gui.glade
index 36e173a..30dd51a 100644
--- a/tuned-gui.glade
+++ b/tuned-gui.glade
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
- <requires lib="gtk+" version="3.10"/>
<object class="GtkAboutDialog" id="aboutdialog1">
<property name="can_focus">False</property>
<property name="type_hint">dialog</property>
@@ -729,12 +728,6 @@
<object class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkListBox" id="listboxSummaryOfActiveProfile">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </object>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/tuned-gui.py b/tuned-gui.py
index 8f72fd5..54fd815 100755
--- a/tuned-gui.py
+++ b/tuned-gui.py
@@ -320,8 +320,6 @@ class Base(object):
self.label_actual_profile.set_text(self.controller.active_profile())
if self.config.get(consts.CFG_RECOMMEND_COMMAND):
self.label_recommended_profile.set_text(self.controller.recommend_profile())
- self.listbox_summary_of_active_profile = \
- self.builder.get_object('listboxSummaryOfActiveProfile')
self.data_for_listbox_summary_of_active_profile()
self.comboboxtext_fast_change_profile.set_model(self.treestore_profiles)
@@ -446,9 +444,6 @@ class Base(object):
This method is emited after change profile and on startup of app.
"""
- for row in self.listbox_summary_of_active_profile:
- self.listbox_summary_of_active_profile.remove(row)
-
if self.is_tuned_connection_ok():
self.active_profile = \
self.manager.get_profile(self.controller.active_profile())
@@ -464,51 +459,6 @@ class Base(object):
self.label_summary_included_profile.set_text('None')
- row = Gtk.ListBoxRow()
- box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=0)
- plugin_name = Gtk.Label()
- plugin_name.set_markup('<b>Plugin Name</b>')
- plugin_option = Gtk.Label()
- plugin_option.set_markup('<b>Plugin Options</b>')
- box.pack_start(plugin_name, True, True, 0)
- box.pack_start(plugin_option, True, True, 0)
- row.add(box)
-
- self.listbox_summary_of_active_profile.add(row)
-
- sep = Gtk.Separator.new(Gtk.Orientation.HORIZONTAL)
- self.listbox_summary_of_active_profile.add(sep)
- sep.show()
-
- for u in self.active_profile.units:
- row = Gtk.ListBoxRow()
- hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL,
- spacing=0)
- hbox.set_homogeneous(True)
- row.add(hbox)
- label = Gtk.Label()
- label.set_markup(u)
- label.set_justify(Gtk.Justification.LEFT)
- hbox.pack_start(label, False, True, 1)
-
- grid = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
- spacing=0)
- grid.set_homogeneous(True)
- for o in self.active_profile.units[u].options:
- label_option = Gtk.Label()
- label_option.set_markup(o + ' = ' + '<b>'
- + self.active_profile.units[u].options[o]
- + '</b>')
- grid.pack_start(label_option, False, True, 0)
-
- hbox.pack_start(grid, False, True, 0)
- self.listbox_summary_of_active_profile.add(row)
- separator = Gtk.Separator.new(Gtk.Orientation.HORIZONTAL)
- self.listbox_summary_of_active_profile.add(separator)
- separator.show()
-
- self.listbox_summary_of_active_profile.show_all()
-
# def on_treeview_button_press_event(self, treeview, event):
# popup = Gtk.Menu()
# popup.append(Gtk.MenuItem('add'))

94
SOURCES/tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch

@ -0,0 +1,94 @@ @@ -0,0 +1,94 @@
From 837c6bd12a5eedc3fbf46291bf1040e724786efd Mon Sep 17 00:00:00 2001
From: Marcelo Tosatti <mtosatti@redhat.com>
Date: Fri, 31 Aug 2018 13:27:12 +0200
Subject: [PATCH] start/stop rt-entsk daemon on initialization/shutdown
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The rt-entsk application, part of newer rt-setup packages,
worksaround a latency issue with static key
IPI's. What it does it:

/*
* Open a socket, and enable timestamping on it.
*
* This is to avoid Chrony from changing timestamping
* user count from 0->1 and vice-versa, causing
* static key enable/disable IPIs.
*
*/

Start/stop the systemctl service from the realtime-virtual-host
and realtime-virtual-guest profiles.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
---
profiles/realtime-virtual-guest/script.sh | 19 +++++++++++++++++++
profiles/realtime-virtual-guest/tuned.conf | 3 +++
profiles/realtime-virtual-host/script.sh | 2 ++
3 files changed, 24 insertions(+)
create mode 100755 profiles/realtime-virtual-guest/script.sh

diff --git a/profiles/realtime-virtual-guest/script.sh b/profiles/realtime-virtual-guest/script.sh
new file mode 100755
index 0000000..33cb730
--- /dev/null
+++ b/profiles/realtime-virtual-guest/script.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+. /usr/lib/tuned/functions
+
+start() {
+ systemctl start rt-entsk
+ return "$?"
+}
+
+stop() {
+ systemctl stop rt-entsk
+ return "$?"
+}
+
+verify() {
+ return "$?"
+}
+
+process $@
diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf
index fb2bc42..8e1f67e 100644
--- a/profiles/realtime-virtual-guest/tuned.conf
+++ b/profiles/realtime-virtual-guest/tuned.conf
@@ -36,5 +36,8 @@ group.ktimersoftd=0:f:3:*:ktimersoftd.*
ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*
+[script]
+script=${i:PROFILE_DIR}/script.sh
+
[bootloader]
cmdline_rvg=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores}
diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh
index 515d254..a9366cb 100755
--- a/profiles/realtime-virtual-host/script.sh
+++ b/profiles/realtime-virtual-host/script.sh
@@ -87,6 +87,7 @@ start() {
if [ -f $CACHE_VALUE_FILE ]; then
echo `cat $CACHE_VALUE_FILE` > $KVM_LAPIC_FILE
fi
+ systemctl start rt-entsk
return 0
}
@@ -94,6 +95,7 @@ start() {
stop() {
[ "$1" = "full_rollback" ] && teardown_kvm_mod_low_latency
enable_ksm
+ systemctl stop rt-entsk
return "$?"
}
--
2.14.4

104
SOURCES/tuned-2.10.0-use-online-cpus.patch

@ -0,0 +1,104 @@ @@ -0,0 +1,104 @@
diff --git a/profiles/cpu-partitioning/tuned.conf b/profiles/cpu-partitioning/tuned.conf
index 3c52215..1821b74 100644
--- a/profiles/cpu-partitioning/tuned.conf
+++ b/profiles/cpu-partitioning/tuned.conf
@@ -19,13 +19,13 @@ tmpdir=${f:strip:${f:exec:/usr/bin/mktemp:-d}}
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
isolated_cpumask=${f:cpulist2hex:${isolated_cores_expanded}}
not_isolated_cores_expanded=${f:cpulist_invert:${isolated_cores_expanded}}
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
-not_isolated_cores_present_expanded=${f:cpulist_present:${not_isolated_cores_expanded}}
+isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
+not_isolated_cores_online_expanded=${f:cpulist_online:${not_isolated_cores_expanded}}
not_isolated_cpumask=${f:cpulist2hex:${not_isolated_cores_expanded}}
no_balance_cores_expanded=${f:cpulist_unpack:${no_balance_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}}
+# Fail if isolated_cores contains CPUs which are not online
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
[sysctl]
kernel.hung_task_timeout_secs = 600
diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf
index b90e76f..fb2bc42 100644
--- a/profiles/realtime-virtual-guest/tuned.conf
+++ b/profiles/realtime-virtual-guest/tuned.conf
@@ -15,10 +15,10 @@ isolated_cores_assert_check = \\${isolated_cores}
assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}}
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
+isolated_cores_online_expanded=${f:cpulist_online:${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}}
+# Fail if isolated_cores contains CPUs which are not online
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
[scheduler]
# group.group_name=rule_priority:scheduler_policy:scheduler_priority:core_affinity_in_hex:process_name_regex
diff --git a/profiles/realtime-virtual-host/tuned.conf b/profiles/realtime-virtual-host/tuned.conf
index 0346fff..5e0ff1f 100644
--- a/profiles/realtime-virtual-host/tuned.conf
+++ b/profiles/realtime-virtual-host/tuned.conf
@@ -20,10 +20,10 @@ isolated_cores_assert_check = \\${isolated_cores}
assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}}
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
+isolated_cores_online_expanded=${f:cpulist_online:${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}}
+# Fail if isolated_cores contains CPUs which are not online
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
[scheduler]
# group.group_name=rule_priority:scheduler_policy:scheduler_priority:core_affinity_in_hex:process_name_regex
diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf
index b2273cf..c595e67 100644
--- a/profiles/realtime/tuned.conf
+++ b/profiles/realtime/tuned.conf
@@ -18,10 +18,10 @@ assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isola
# Non-isolated cores cpumask including offline cores
not_isolated_cpumask = ${f:cpulist2hex_invert:${isolated_cores}}
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
+isolated_cores_online_expanded=${f:cpulist_online:${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}}
+# Fail if isolated_cores contains CPUs which are not online
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
[sysctl]
kernel.hung_task_timeout_secs = 600
diff --git a/tuned/profiles/functions/function_cpulist_invert.py b/tuned/profiles/functions/function_cpulist_invert.py
index 375eb67..2aff3c9 100644
--- a/tuned/profiles/functions/function_cpulist_invert.py
+++ b/tuned/profiles/functions/function_cpulist_invert.py
@@ -8,7 +8,7 @@ log = tuned.logs.get()
class cpulist_invert(base.Function):
"""
Inverts list of CPUs (makes its complement). For the complement it
- gets number of present CPUs from the /sys/devices/system/cpu/present,
+ gets number of present CPUs from the /sys/devices/system/cpu/online,
e.g. system with 4 CPUs (0-3), the inversion of list "0,2,3" will be
"1"
"""
diff --git a/tuned/utils/commands.py b/tuned/utils/commands.py
index 8b7df57..41d6d99 100644
--- a/tuned/utils/commands.py
+++ b/tuned/utils/commands.py
@@ -363,8 +363,8 @@ class commands:
# Inverts CPU list (i.e. makes its complement)
def cpulist_invert(self, l):
cpus = self.cpulist_unpack(l)
- present = self.cpulist_unpack(self.read_file("/sys/devices/system/cpu/present"))
- return list(set(present) - set(cpus))
+ online = self.cpulist_unpack(self.read_file("/sys/devices/system/cpu/online"))
+ return list(set(online) - set(cpus))
# Converts CPU list to hexadecimal CPU mask
def cpulist2hex(self, l):

81
SPECS/tuned.spec

@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
#%%global prerelease rc
#%%global prereleasenum 2
#%%global prereleasenum 1

%global prerel1 %{?prerelease:.%{prerelease}%{prereleasenum}}
%global prerel2 %{?prerelease:-%{prerelease}.%{prereleasenum}}

Summary: A dynamic adaptive system tuning daemon
Name: tuned
Version: 2.9.0
Release: 1%{?prerel1}%{?dist}
Version: 2.10.0
Release: 6%{?prerel1}%{?dist}
License: GPLv2+
Source: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel1}.tar.gz
Source: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}.tar.gz#/%{name}-%{version}%{?prerel2}.tar.gz
URL: http://www.tuned-project.org/
BuildArch: noarch
BuildRequires: python, systemd, desktop-file-utils
@ -21,7 +21,9 @@ Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev @@ -21,7 +21,9 @@ Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev
Requires: virt-what, python-configobj, ethtool, gawk
Requires: util-linux, python-perf, dbus, polkit, python-linux-procfs
Requires: python-schedutils
Patch0: tuned-2.8.0-gtk-3.8.patch
Patch0: tuned-2.10.0-gtk-3.8.patch
Patch1: tuned-2.10.0-use-online-cpus.patch
Patch2: tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch

%description
The tuned package contains a daemon that tunes system settings dynamically.
@ -74,6 +76,13 @@ Requires: %{name} = %{version} @@ -74,6 +76,13 @@ Requires: %{name} = %{version}
%description profiles-sap
Additional tuned profile(s) targeted to SAP NetWeaver loads.

%package profiles-mssql
Summary: Additional tuned profile(s) for MS SQL Server
Requires: %{name} = %{version}

%description profiles-mssql
Additional tuned profile(s) for MS SQL Server.

%package profiles-oracle
Summary: Additional tuned profile(s) targeted to Oracle loads
Requires: %{name} = %{version}
@ -149,13 +158,16 @@ It can be also used to fine tune your system for specific scenarios. @@ -149,13 +158,16 @@ It can be also used to fine tune your system for specific scenarios.
%prep
%setup -q -n %{name}-%{version}%{?prerel2}
%patch0 -p1

%patch1 -p1
%patch2 -p1
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1626473
chmod 0755 profiles/realtime-virtual-guest/script.sh

%build


%install
make install DESTDIR=%{buildroot} DOCDIR=%{docdir}
make install DESTDIR=%{buildroot} DOCDIR=%{docdir} PYTHON=python2
%if 0%{?rhel}
sed -i 's/\(dynamic_tuning[ \t]*=[ \t]*\).*/\10/' %{buildroot}%{_sysconfdir}/tuned/tuned-main.conf
%endif
@ -272,6 +284,7 @@ fi @@ -272,6 +284,7 @@ fi
%exclude %{_prefix}/lib/tuned/sap-netweaver
%exclude %{_prefix}/lib/tuned/sap-hana
%exclude %{_prefix}/lib/tuned/sap-hana-vmware
%exclude %{_prefix}/lib/tuned/mssql
%exclude %{_prefix}/lib/tuned/oracle
%exclude %{_prefix}/lib/tuned/atomic-host
%exclude %{_prefix}/lib/tuned/atomic-guest
@ -343,6 +356,11 @@ fi @@ -343,6 +356,11 @@ fi
%{_prefix}/lib/tuned/sap-hana-vmware
%{_mandir}/man7/tuned-profiles-sap-hana.7*

%files profiles-mssql
%defattr(-,root,root,-)
%{_prefix}/lib/tuned/mssql
%{_mandir}/man7/tuned-profiles-mssql.7*

%files profiles-oracle
%defattr(-,root,root,-)
%{_prefix}/lib/tuned/oracle
@ -394,6 +412,55 @@ fi @@ -394,6 +412,55 @@ fi
%{_mandir}/man7/tuned-profiles-compat.7*

%changelog
* Fri Sep 7 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-6
- Added workaround for rpmbuild bug 1626473
related: rhbz#1616043

* Thu Sep 6 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-5
- Fixed realtime-virtual-guest profile to call script.sh
related: rhbz#1616043

* Wed Sep 5 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-4
- De-fuzzified realtime-virtual-enable-rt-entsk patch
related: rhbz#1616043

* Wed Sep 5 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-3
- realtime-virtual-guest/host: start/stop rt-entsk daemon on
initialization/shutdown
resolves: rhbz#1616043

* Tue Aug 7 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-2
- use online CPUs for cpusets calculations instead of present CPUs
resolves: rhbz#1613478

* Wed Jul 4 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-1
- new release
- rebased tuned to latest upstream
related: rhbz#1546598
- IRQ affinity handled by scheduler plugin
resolves: rhbz#1590937

* Mon Jun 11 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.10.0-0.1.rc1
- new release
- rebased tuned to latest upstream
resolves: rhbz#1546598
- script: show stderr output in the log
- realtime-virtual-host: script.sh: add error checking
- man: improved tuned-profiles-cpu-partitioning.7
- bootloader: check if grub2_cfg_file_name is None in _remove_grub2_tuning()
- plugin_scheduler: whitelist/blacklist processed also for thread names
- bootloader: patch all GRUB2 config files
- profiles: added mssql profile
- tuned-adm: print log excerpt when changing profile
- cpu-partitioning: use no_balance_cores instead of no_rebalance_cores
- sysctl: support assignment modifiers as other plugins do
- oracle: fixed ip_local_port_range parity warning
resolves: rhbz#1527219
- Fix verifying cpumask on systems with more than 32 cores
resolves: rhbz#1528368
- oracle: updated the profile to be in sync with KCS 39188
resolves: rhbz#1447323

* Sun Oct 29 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.9.0-1
- new release
- rebased tuned to latest upstream

Loading…
Cancel
Save