diff --git a/.gitignore b/.gitignore index 05be9b3..1094b3d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/tuned-2.10.0.tar.gz +SOURCES/tuned-2.11.0.tar.gz diff --git a/.tuned.metadata b/.tuned.metadata index 8c2c6b0..90061e7 100644 --- a/.tuned.metadata +++ b/.tuned.metadata @@ -1 +1 @@ -24ecb366bf503d8f6a79ced3f8faf239c81ad8cf SOURCES/tuned-2.10.0.tar.gz +d2e98261d538338567277cc07e07765084067dc8 SOURCES/tuned-2.11.0.tar.gz diff --git a/SOURCES/0001-Fix-verifying-sysctl-options-with-tabs.patch b/SOURCES/0001-Fix-verifying-sysctl-options-with-tabs.patch new file mode 100644 index 0000000..917b28d --- /dev/null +++ b/SOURCES/0001-Fix-verifying-sysctl-options-with-tabs.patch @@ -0,0 +1,26 @@ +From b6eb3416eac4e8ca21ae7d65ca9a79f18e078af7 Mon Sep 17 00:00:00 2001 +From: kbotc +Date: Tue, 14 May 2019 16:45:22 -0600 +Subject: [PATCH] Fix verifying sysctl options with tabs + +sysctl options such as net.ipv4.tcp_wmem and net.ipv4.tcp_rmem include tabs. When you use tuned-adm verify, the changes report back as broken as the whitespaces are different because one side has been sanitized but the other side has not. This pull request will fix that. +--- + tuned/plugins/plugin_sysctl.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tuned/plugins/plugin_sysctl.py b/tuned/plugins/plugin_sysctl.py +index 9088bf0..537c896 100644 +--- a/tuned/plugins/plugin_sysctl.py ++++ b/tuned/plugins/plugin_sysctl.py +@@ -76,7 +76,7 @@ class SysctlPlugin(base.Plugin): + curr_val = _read_sysctl(option) + value = self._process_assignment_modifiers(self._variables.expand(value), curr_val) + if value is not None: +- if self._verify_value(option, self._cmd.remove_ws(value), curr_val, ignore_missing) == False: ++ if self._verify_value(option, self._cmd.remove_ws(value), self._cmd.remove_ws(curr_val), ignore_missing) == False: + ret = False + return ret + +-- +2.20.1 + diff --git a/SOURCES/0001-functions-Return-an-ordered-cpu-list-in-cpulist_onli.patch b/SOURCES/0001-functions-Return-an-ordered-cpu-list-in-cpulist_onli.patch new file mode 100644 index 0000000..599ea32 --- /dev/null +++ b/SOURCES/0001-functions-Return-an-ordered-cpu-list-in-cpulist_onli.patch @@ -0,0 +1,32 @@ +From e0bf0252a45a60b9cf4d359c3bf171baed28ba70 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Thu, 9 May 2019 10:23:07 +0200 +Subject: [PATCH] functions: Return an ordered cpu list in cpulist_online +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +cpulist_unpack, which is used in the function, returns an ordered cpu +list, however by converting it to a set, the order is lost. Rewrite the +operation in a way that preserves the order. + +Resolves: rhbz#1706171 + +Signed-off-by: Ondřej Lysoněk +--- + tuned/profiles/functions/function_cpulist_online.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tuned/profiles/functions/function_cpulist_online.py b/tuned/profiles/functions/function_cpulist_online.py +index 1badf3d..64d930c 100644 +--- a/tuned/profiles/functions/function_cpulist_online.py ++++ b/tuned/profiles/functions/function_cpulist_online.py +@@ -19,4 +19,4 @@ class cpulist_online(base.Function): + return None + cpus = self._cmd.cpulist_unpack(",".join(args)) + online = self._cmd.cpulist_unpack(self._cmd.read_file("/sys/devices/system/cpu/online")) +- return ",".join(str(v) for v in set(cpus).intersection(set(online))) ++ return ",".join(str(v) for v in cpus if v in online) +-- +2.20.1 + diff --git a/SOURCES/0001-sysctl-Ignore-non-existent-settings-from-system-sysc.patch b/SOURCES/0001-sysctl-Ignore-non-existent-settings-from-system-sysc.patch new file mode 100644 index 0000000..f122181 --- /dev/null +++ b/SOURCES/0001-sysctl-Ignore-non-existent-settings-from-system-sysc.patch @@ -0,0 +1,68 @@ +From fb6d2cc90e09e85586bf5599c298fb01c3f01eee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Wed, 29 May 2019 17:07:55 +0200 +Subject: [PATCH] sysctl: Ignore non-existent settings from system sysctl + configs +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Ignore non-existent sysctl settings from the system configuration files +(/etc/sysctl.conf, etc.). Logging errors about these settings hurts user +experience, if the non-existent settings are in fact real settings that +are just temporarily unavailable. For example, the following settings +(from /usr/lib/sysctl.d/00-system.conf on RHEL-7) are not available until +the br_netfilter module is loaded. However once that module is loaded, +it is often desirable to set these, so having them in a RHEL-provided +configuration file makes sense. + +net.bridge.bridge-nf-call-ip6tables = 0 +net.bridge.bridge-nf-call-iptables = 0 +net.bridge.bridge-nf-call-arptables = 0 + +This change restores the old behaviour before the recent rewrite of the +sysctl plugin away from using the 'sysctl' program (running +'sysctl --system' ignores missing settings). + +Resolves: rhbz#1714595 + +Signed-off-by: Ondřej Lysoněk +--- + tuned/plugins/plugin_sysctl.py | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/tuned/plugins/plugin_sysctl.py b/tuned/plugins/plugin_sysctl.py +index 537c896..13e2eac 100644 +--- a/tuned/plugins/plugin_sysctl.py ++++ b/tuned/plugins/plugin_sysctl.py +@@ -133,7 +133,7 @@ def _apply_sysctl_config_line(path, lineno, line): + % (path, lineno)) + return + value = value.strip() +- _write_sysctl(option, value) ++ _write_sysctl(option, value, ignore_missing = True) + + def _get_sysctl_path(option): + return "/proc/sys/%s" % option.replace(".", "/") +@@ -161,7 +161,7 @@ def _read_sysctl(option): + % (option, str(e))) + return None + +-def _write_sysctl(option, value): ++def _write_sysctl(option, value, ignore_missing = False): + path = _get_sysctl_path(option) + if os.path.basename(path) in DEPRECATED_SYSCTL_OPTIONS: + log.error("Refusing to set deprecated sysctl option %s" +@@ -175,7 +175,8 @@ def _write_sysctl(option, value): + return True + except (OSError, IOError) as e: + if e.errno == errno.ENOENT: +- log.error("Failed to set sysctl parameter '%s' to '%s', the parameter does not exist" ++ log_func = log.debug if ignore_missing else log.error ++ log_func("Failed to set sysctl parameter '%s' to '%s', the parameter does not exist" + % (option, value)) + else: + log.error("Failed to set sysctl parameter '%s' to '%s': %s" +-- +2.20.1 + diff --git a/SOURCES/0001-virtual-host-Fix-setting-force_latency.patch b/SOURCES/0001-virtual-host-Fix-setting-force_latency.patch new file mode 100644 index 0000000..984f378 --- /dev/null +++ b/SOURCES/0001-virtual-host-Fix-setting-force_latency.patch @@ -0,0 +1,33 @@ +From 96363628f728f296d2efc69d1d3914afdfbbb844 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Thu, 25 Apr 2019 10:42:03 +0200 +Subject: [PATCH] virtual-host: Fix setting force_latency +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The force_latency parameter belongs to the cpu plugin, so that's the +section it needs to be in. + +Fixes #132 +Resolves: rhbz#1569375 + +Signed-off-by: Ondřej Lysoněk +--- + profiles/virtual-host/tuned.conf | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf +index 7bd3330..ca493d6 100644 +--- a/profiles/virtual-host/tuned.conf ++++ b/profiles/virtual-host/tuned.conf +@@ -16,5 +16,6 @@ vm.dirty_background_ratio = 5 + # (system default is 500000, i.e. 0.5 ms) + kernel.sched_migration_cost_ns = 5000000 + ++[cpu] + # Setting C3 state sleep mode/power savings + force_latency=70 +-- +2.20.1 + diff --git a/SOURCES/tuned-2.10.0-disable-ksm-once.patch b/SOURCES/tuned-2.10.0-disable-ksm-once.patch deleted file mode 100644 index f2f097f..0000000 --- a/SOURCES/tuned-2.10.0-disable-ksm-once.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/profiles/cpu-partitioning/script.sh b/profiles/cpu-partitioning/script.sh -index 0e94d3a..efe9bcb 100755 ---- a/profiles/cpu-partitioning/script.sh -+++ b/profiles/cpu-partitioning/script.sh -@@ -54,8 +54,8 @@ stop() { - then - sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance - teardown_kvm_mod_low_latency -+ enable_ksm - fi -- enable_ksm - enable_balance_domains - return "$?" - } -diff --git a/profiles/functions b/profiles/functions -index 2df8168..919409c 100644 ---- a/profiles/functions -+++ b/profiles/functions -@@ -531,35 +531,30 @@ teardown_kvm_mod_low_latency() - - KSM_SERVICES="ksm ksmtuned" - KSM_RUN_PATH=/sys/kernel/mm/ksm/run -+KSM_MASK_FILE="${STORAGE_PERSISTENT}/ksm-masked" - - disable_ksm() - { -- for s in $KSM_SERVICES; do -- if systemctl is-enabled -q $s; then -- systemctl -q disable $s -+ if [ ! -f $KSM_MASK_FILE ]; then -+ # Always create $KSM_MASK_FILE, since we don't want to -+ # run any systemctl commands during boot -+ if ! touch $KSM_MASK_FILE; then -+ die "failed to create $KSM_MASK_FILE" - fi -- -- if systemctl is-active -q $s; then -- systemctl -q stop $s -- fi -- done -- -- if [ -f $KSM_RUN_PATH ]; then -+ systemctl --now --quiet mask $KSM_SERVICES - # Unmerge all shared pages -- echo 2 > $KSM_RUN_PATH -+ test -f $KSM_RUN_PATH && echo 2 > $KSM_RUN_PATH - fi - } - -+# Should only be called when full_rollback == true - enable_ksm() - { -- for s in $KSM_SERVICES; do -- systemctl -q preset $s -- -- # Only start the service if it's enabled by defaut -- if systemctl is-enabled -q $s; then -- systemctl start $s -+ if [ -f $KSM_MASK_FILE ]; then -+ if systemctl --quiet unmask $KSM_SERVICES; then -+ rm -f $KSM_MASK_FILE - fi -- done -+ fi - } - - die() { -diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh -index a9366cb..33a7996 100755 ---- a/profiles/realtime-virtual-host/script.sh -+++ b/profiles/realtime-virtual-host/script.sh -@@ -93,8 +93,10 @@ start() { - } - - stop() { -- [ "$1" = "full_rollback" ] && teardown_kvm_mod_low_latency -- enable_ksm -+ if [ "$1" = "full_rollback" ]; then -+ teardown_kvm_mod_low_latency -+ enable_ksm -+ fi - systemctl stop rt-entsk - return "$?" - } diff --git a/SOURCES/tuned-2.10.0-gtk-3.8.patch b/SOURCES/tuned-2.10.0-gtk-3.8.patch deleted file mode 100644 index 2bb12cd..0000000 --- a/SOURCES/tuned-2.10.0-gtk-3.8.patch +++ /dev/null @@ -1,100 +0,0 @@ -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 @@ - - - -- - - False - dialog -@@ -729,12 +728,6 @@ - - True - False -- -- -- True -- False -- -- - - - False -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('Plugin Name') -- plugin_option = Gtk.Label() -- plugin_option.set_markup('Plugin Options') -- 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 + ' = ' + '' -- + self.active_profile.units[u].options[o] -- + '') -- 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')) diff --git a/SOURCES/tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch b/SOURCES/tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch deleted file mode 100644 index e464f0f..0000000 --- a/SOURCES/tuned-2.10.0-realtime-virtual-enable-rt-entsk.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 837c6bd12a5eedc3fbf46291bf1040e724786efd Mon Sep 17 00:00:00 2001 -From: Marcelo Tosatti -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 -Signed-off-by: Jaroslav Škarvada ---- - 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 - diff --git a/SOURCES/tuned-2.10.0-realtime-virtual-host-pin-only-vcpu-thread-to-isolated-pcpu.patch b/SOURCES/tuned-2.10.0-realtime-virtual-host-pin-only-vcpu-thread-to-isolated-pcpu.patch deleted file mode 100644 index 4c02ba3..0000000 --- a/SOURCES/tuned-2.10.0-realtime-virtual-host-pin-only-vcpu-thread-to-isolated-pcpu.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 4790e570ce0e41bde4e1866ed6e3cba723b5f4d8 Mon Sep 17 00:00:00 2001 -From: Marcelo Tosatti -Date: Wed, 4 Jul 2018 17:30:37 -0300 -Subject: [PATCH] realtime-virtual-host: pin only the vcpu thread to isolated - pCPU (v2) - -As noted in the bugzilla ticket - -https://bugzilla.redhat.com/show_bug.cgi?id=1554851 - -The QEMU I/O thread can interrupt the time measurement -of the timer. To avoid this problem, only -pin the vCPU thread. - -Signed-off-by: Marcelo Tosatti -Reviewed-and-Tested-by: Luiz Capitulino - -v2: - - Use unix sockets (Luiz) - - Proper numeric output (Luiz) ---- - profiles/realtime-virtual-host/script.sh | 31 ++++++++++++++++-------- - 1 file changed, 21 insertions(+), 10 deletions(-) - -diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh -index 515d2547..32e962db 100755 ---- a/profiles/realtime-virtual-host/script.sh -+++ b/profiles/realtime-virtual-host/script.sh -@@ -17,20 +17,31 @@ run_tsc_deadline_latency() - - for i in `seq 1000 500 7000`; do - echo $i > $KVM_LAPIC_FILE -- chrt -f 1 taskset -c $1 $QEMU -enable-kvm -device pc-testdev \ -+ -+ unixpath=`mktemp` -+ -+ chrt -f 1 $QEMU -S -enable-kvm -device pc-testdev \ - -device isa-debug-exit,iobase=0xf4,iosize=0x4 \ - -display none -serial stdio -device pci-testdev \ - -kernel "$TSCDEADLINE_LATENCY" \ -- -cpu host | grep latency | cut -f 2 -d ":" > $dir/out -- -- if [ ! -f $dir/out ]; then -- die running $TSCDEADLINE_LATENCY failed -- fi -+ -cpu host \ -+ -mon chardev=char0,mode=readline \ -+ -chardev socket,id=char0,nowait,path=$unixpath,server | grep latency | cut -f 2 -d ":" > $dir/out & -+ -+ sleep 1s -+ pidofvcpu=`echo "info cpus" | nc -U $unixpath | grep thread_id | cut -f 3 -d "=" | tr -d "\r"` -+ taskset -p -c $1 $pidofvcpu >/dev/null -+ echo "cont" | nc -U $unixpath >/dev/null -+ wait -+ -+ if [ ! -f $dir/out ]; then -+ die running $TSCDEADLINE_LATENCY failed -+ fi - -- tmp=$(wc -l $dir/out | awk '{ print $1 }') -- if [ $tmp -eq 0 ]; then -- die running $TSCDEADLINE_LATENCY failed -- fi -+ tmp=$(wc -l $dir/out | awk '{ print $1 }') -+ if [ $tmp -eq 0 ]; then -+ die running $TSCDEADLINE_LATENCY failed -+ fi - - A=0 - while read l; do diff --git a/SOURCES/tuned-2.10.0-update-kvm-modprobe-file.patch b/SOURCES/tuned-2.10.0-update-kvm-modprobe-file.patch deleted file mode 100644 index d4d4886..0000000 --- a/SOURCES/tuned-2.10.0-update-kvm-modprobe-file.patch +++ /dev/null @@ -1,73 +0,0 @@ -From c4a0aef63df41a79e96c1276ac732ecde8d58d86 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= -Date: Thu, 22 Nov 2018 17:38:12 +0100 -Subject: [PATCH] functions: reworked setup_kvm_mod_low_latency to count with - kernel changes -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It updates the KVM modprobe file if its content differs from what's -supported on the current system. It may look a bit over-engineered, but -it's done this way to lower the possibility of race condition. - -Resolves: rhbz#1649408 - -Signed-off-by: Jaroslav Škarvada ---- - profiles/functions | 35 +++++++++++++++++++---------------- - 1 file changed, 19 insertions(+), 16 deletions(-) - -diff --git a/profiles/functions b/profiles/functions -index 919409c..aab608a 100644 ---- a/profiles/functions -+++ b/profiles/functions -@@ -503,26 +503,29 @@ eee_set_normal_fsb() { - - kvm_modprobe_file=/etc/modprobe.d/kvm.rt.tuned.conf - --setup_kvm_mod_low_latency() -+teardown_kvm_mod_low_latency() - { -- if [ -f $kvm_modprobe_file ]; then -- return -- fi -- -- modinfo -p kvm | grep -q kvmclock_periodic_sync -- if [ "$?" -eq 0 ]; then -- echo "options kvm kvmclock_periodic_sync=0" > $kvm_modprobe_file -- fi -- -- modinfo -p kvm_intel | grep -q ple_gap -- if [ "$?" -eq 0 ]; then -- echo "options kvm_intel ple_gap=0" >> $kvm_modprobe_file -- fi -+ rm -f $kvm_modprobe_file - } - --teardown_kvm_mod_low_latency() -+setup_kvm_mod_low_latency() - { -- rm -f $kvm_modprobe_file -+ local HAS_KPS="" -+ local HAS_PLE_GAP="" -+ local WANTS_KPS="" -+ local WANTS_PLE_GAP="" -+ -+ modinfo -p kvm | grep -q kvmclock_periodic_sync && HAS_KPS=1 -+ modinfo -p kvm_intel | grep -q ple_gap && HAS_PLE_GAP=1 -+ grep -qs kvmclock_periodic_sync "$kvm_modprobe_file" && WANTS_KPS=1 -+ grep -qs ple_gap "$kvm_modprobe_file" && WANTS_PLE_GAP=1 -+ -+ if [ "$HAS_KPS" != "$WANTS_KPS" -o "$HAS_PLE_GAP" != "$WANTS_PLE_GAP" ]; then -+ teardown_kvm_mod_low_latency -+ [ "$HAS_KPS" ] && echo "options kvm kvmclock_periodic_sync=0" > $kvm_modprobe_file -+ [ "$HAS_PLE_GAP" ] && echo "options kvm_intel ple_gap=0" >> $kvm_modprobe_file -+ fi -+ return 0 - } - - # --- -2.14.5 - diff --git a/SOURCES/tuned-2.10.0-use-online-cpus.patch b/SOURCES/tuned-2.10.0-use-online-cpus.patch deleted file mode 100644 index 8cc34fd..0000000 --- a/SOURCES/tuned-2.10.0-use-online-cpus.patch +++ /dev/null @@ -1,104 +0,0 @@ -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): diff --git a/SPECS/tuned.spec b/SPECS/tuned.spec index 52487c7..3a2b3c7 100644 --- a/SPECS/tuned.spec +++ b/SPECS/tuned.spec @@ -6,27 +6,29 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned -Version: 2.10.0 -Release: 6%{?prerel1}%{?dist}.4 +Version: 2.11.0 +Release: 5%{?prerel1}%{?dist} License: GPLv2+ 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 +BuildRequires: python, python-devel, systemd, desktop-file-utils Requires(post): systemd, virt-what Requires(preun): systemd Requires(postun): systemd Requires: python-decorator, dbus-python, pygobject3-base, python-pyudev -# kernel-tools, hdparm dependencies are not met on s390 +# kernel-tools, hdparm, python-dmidecode dependencies are not met on s390 Requires: virt-what, python-configobj, ethtool, gawk Requires: util-linux, python-perf, dbus, polkit, python-linux-procfs Requires: python-schedutils -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 -Patch3: tuned-2.10.0-disable-ksm-once.patch -Patch4: tuned-2.10.0-update-kvm-modprobe-file.patch -Patch5: tuned-2.10.0-realtime-virtual-host-pin-only-vcpu-thread-to-isolated-pcpu.patch +# Upstream patch: +Patch1: 0001-virtual-host-Fix-setting-force_latency.patch +# Upstream patch: +Patch2: 0001-functions-Return-an-ordered-cpu-list-in-cpulist_onli.patch +# Upstream patch: +Patch3: 0001-Fix-verifying-sysctl-options-with-tabs.patch +# Upstream patch: +Patch4: 0001-sysctl-Ignore-non-existent-settings-from-system-sysc.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -160,21 +162,17 @@ 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 %patch3 -p1 %patch4 -p1 -%patch5 -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} PYTHON=python2 +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 @@ -192,11 +190,12 @@ mkdir -p %{buildroot}%{_var}/lib/tuned mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf +# BLS not supported, no need to install kernel hooks +rm -rf %{buildroot}%{_prefix}/lib/kernel + # validate desktop file desktop-file-validate %{buildroot}%{_datadir}/applications/tuned-gui.desktop -mkdir -p %{buildroot}%{_sysconfdir}/tuned/recommend.d - %post %systemd_post tuned.service @@ -328,7 +327,6 @@ fi %{_sbindir}/tuned-gui %{python_sitelib}/tuned/gtk %{_datadir}/tuned/ui -%{_datadir}/polkit-1/actions/com.redhat.tuned.gui.policy %{_datadir}/icons/hicolor/scalable/apps/tuned.svg %{_datadir}/applications/tuned-gui.desktop @@ -419,21 +417,67 @@ fi %{_mandir}/man7/tuned-profiles-compat.7* %changelog -* Wed Jul 10 2019 Jaroslav Škarvada - 2.10.0-6.4 -- realtime-virtual-host: pin only the vcpu thread to isolated pcpu - Resolves: rhbz#1728699 +* Fri Jun 07 2019 Ondřej Lysoněk - 2.11.0-5 +- Ignore non-existent settings from system sysctl configs +- Resolves: rhbz#1714595 -* Tue Nov 27 2018 Jaroslav Škarvada - 2.10.0-6.3 -- Reworked setup_kvm_mod_low_latency to count with kernel changes - Resolves: rhbz#1653767 +* Fri May 17 2019 Ondřej Lysoněk - 2.11.0-4 +- Fixed verification of sysctl parameters whose values contain tabs +- Resolves: rhbz#1711230 + +* Tue May 14 2019 Ondřej Lysoněk - 2.11.0-3 +- Fixed assertion that isolated_cores contain online CPUs +- Resolves: rhbz#1706171 + +* Thu Apr 25 2019 Ondřej Lysoněk - 2.11.0-2 +- Fix setting force_latency in the virtual-host profile +- Resolves: rhbz#1569375 + +* Thu Mar 21 2019 Jaroslav Škarvada - 2.11.0-1 +- new release + - rebased tuned to latest upstream + related: rhbz#1643654 + - used dmidecode only on x86 architectures + resolves: rhbz#1688371 + - recommend: fixed to work without tuned daemon running + resolves: rhbz#1687397 -* Tue Nov 27 2018 Jaroslav Škarvada - 2.10.0-6.2 +* Sun Mar 10 2019 Jaroslav Škarvada - 2.11.0-0.1.rc1 +- new release + - rebased tuned to latest upstream + resolves: rhbz#1643654 + - disable KSM only once, re-enable it only on full rollback + resolves: rhbz#1622239 + - functions: reworked setup_kvm_mod_low_latency to count with kernel changes + resolves: rhbz#1649408 + - updated virtual-host profile + resolves: rhbz#1569375 + - added log message for unsupported parameters in plugin_net + resolves: rhbz#1533852 + - added range feature for cpu exclusion + resolves: rhbz#1533908 + - make a copy of devices when verifying tuning + resolves: rhbz#1592743 + - fixed disk plugin/plugout problem + resolves: rhbz#1595156 + - fixed unit configuration reading + resolves: rhbz#1613379 + - reload profile configuration on SIGHUP + resolves: rhbz#1631744 + - use built-in functionality to apply system sysctl + resolves: rhbz#1663412 + +* Tue Nov 27 2018 Jaroslav Škarvada - 2.10.0-9 - Updated disable-ksm-once patch - Related: rhbz#1652822 + Related: rhbz#1622239 + +* Thu Nov 22 2018 Jaroslav Škarvada - 2.10.0-8 +- Reworked setup_kvm_mod_low_latency to count with kernel changes + Resolves: rhbz#1649408 -* Fri Nov 23 2018 Jaroslav Škarvada - 2.10.0-6.1 +* Thu Nov 22 2018 Jaroslav Škarvada - 2.10.0-7 - Disable ksm once, re-enable it on full rollback - Resolves: rhbz#1652822 + Resolves: rhbz#1622239 * Fri Sep 7 2018 Jaroslav Škarvada - 2.10.0-6 - Added workaround for rpmbuild bug 1626473