diff --git a/.gitignore b/.gitignore index 62850fb..0472962 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/tuned-2.12.0.tar.gz +SOURCES/tuned-2.13.0.tar.gz diff --git a/.tuned.metadata b/.tuned.metadata index 0ace498..55fb87f 100644 --- a/.tuned.metadata +++ b/.tuned.metadata @@ -1 +1 @@ -e28eeb10b3389ff1eae07af83befbf1d69f4661b SOURCES/tuned-2.12.0.tar.gz +d3087cc836c493fb6da69326c36ed5ee25ca67bd SOURCES/tuned-2.13.0.tar.gz diff --git a/SOURCES/tuned-2.12-latency-as-cstate.patch b/SOURCES/tuned-2.12-latency-as-cstate.patch deleted file mode 100644 index 69bcb0d..0000000 --- a/SOURCES/tuned-2.12-latency-as-cstate.patch +++ /dev/null @@ -1,131 +0,0 @@ -diff --git a/profiles/latency-performance/tuned.conf b/profiles/latency-performance/tuned.conf -index 054c554..4cd69a1 100644 ---- a/profiles/latency-performance/tuned.conf -+++ b/profiles/latency-performance/tuned.conf -@@ -6,7 +6,7 @@ - summary=Optimize for deterministic performance at the cost of increased power consumption - - [cpu] --force_latency=1 -+force_latency=cstate.id:1|1 - governor=performance - energy_perf_bias=performance - min_perf_pct=100 -diff --git a/profiles/sap-hana/tuned.conf b/profiles/sap-hana/tuned.conf -index 9afac82..d74250b 100644 ---- a/profiles/sap-hana/tuned.conf -+++ b/profiles/sap-hana/tuned.conf -@@ -7,7 +7,7 @@ summary=Optimize for SAP HANA - include=throughput-performance - - [cpu] --force_latency=70 -+force_latency=cstate.id:3|70 - - [vm] - transparent_hugepages=never -diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf -index ca493d6..8acb92d 100644 ---- a/profiles/virtual-host/tuned.conf -+++ b/profiles/virtual-host/tuned.conf -@@ -18,4 +18,4 @@ kernel.sched_migration_cost_ns = 5000000 - - [cpu] - # Setting C3 state sleep mode/power savings --force_latency=70 -+force_latency=cstate.id:3|70 -diff --git a/tuned/plugins/plugin_cpu.py b/tuned/plugins/plugin_cpu.py -index 77e9448..04c7b19 100644 ---- a/tuned/plugins/plugin_cpu.py -+++ b/tuned/plugins/plugin_cpu.py -@@ -12,8 +12,7 @@ import procfs - - log = tuned.logs.get() - --# TODO: force_latency -> command --# intel_pstate -+cpuidle_states_path = "/sys/devices/system/cpu/cpu0/cpuidle" - - class CPULatencyPlugin(base.Plugin): - """ -@@ -210,13 +209,74 @@ class CPULatencyPlugin(base.Plugin): - def _instance_unapply_dynamic(self, instance, device): - pass - -+ def _str2int(self, s): -+ try: -+ return int(s) -+ except (ValueError, TypeError): -+ return None -+ -+ def _read_cstates_latency(self): -+ self.cstates_latency = {} -+ for d in os.listdir(cpuidle_states_path): -+ cstate_path = cpuidle_states_path + "/%s/" % d -+ name = self._cmd.read_file(cstate_path + "name", err_ret = None, no_error = True) -+ latency = self._cmd.read_file(cstate_path + "latency", err_ret = None, no_error = True) -+ if name is not None and latency is not None: -+ latency = self._str2int(latency) -+ if latency is not None: -+ self.cstates_latency[name.strip()] = latency -+ -+ def _get_latency_by_cstate_name(self, name): -+ log.debug("getting latency for cstate with name '%s'" % name) -+ if self.cstates_latency is None: -+ log.debug("reading cstates latency table") -+ self._read_cstates_latency() -+ latency = self.cstates_latency.get(name, None) -+ log.debug("cstate name mapped to latency: %s" % str(latency)) -+ return latency -+ -+ def _get_latency_by_cstate_id(self, lid): -+ log.debug("getting latency for cstate with ID '%s'" % str(lid)) -+ lid = self._str2int(lid) -+ if lid is None: -+ log.debug("cstate ID is invalid") -+ return None -+ latency_path = cpuidle_states_path + "/%s/latency" % ("state%d" % lid) -+ latency = self._str2int(self._cmd.read_file(latency_path, err_ret = None, no_error = True)) -+ log.debug("cstate ID mapped to latency: %s" % str(latency)) -+ return latency -+ -+ def _parse_latency(self, latency): -+ self.cstates_latency = None -+ latencies = str(latency).split("|") -+ log.debug("parsing latency") -+ for latency in latencies: -+ try: -+ latency = int(latency) -+ log.debug("parsed directly specified latency value: %d" % latency) -+ except ValueError: -+ if latency[0:10] == "cstate.id:": -+ latency = self._get_latency_by_cstate_id(latency[10:]) -+ elif latency[0:12] == "cstate.name:": -+ latency = self._get_latency_by_cstate_name(latency[12:]) -+ else: -+ latency = None -+ log.debug("invalid latency specified: '%s'" % str(latency)) -+ if latency is not None: -+ break -+ return latency -+ - def _set_latency(self, latency): -- latency = int(latency) -- if self._has_pm_qos and self._latency != latency: -- log.info("setting new cpu latency %d" % latency) -- latency_bin = struct.pack("i", latency) -- os.write(self._cpu_latency_fd, latency_bin) -- self._latency = latency -+ latency = self._parse_latency(latency) -+ if self._has_pm_qos: -+ if latency is None: -+ log.error("unable to evaluate latency value (probably wrong settings in the 'cpu' section of current profile), disabling PM QoS") -+ self._has_pm_qos = False -+ elif self._latency != latency: -+ log.info("setting new cpu latency %d" % latency) -+ latency_bin = struct.pack("i", latency) -+ os.write(self._cpu_latency_fd, latency_bin) -+ self._latency = latency - - def _get_available_governors(self, device): - return self._cmd.read_file("/sys/devices/system/cpu/%s/cpufreq/scaling_available_governors" % device).strip().split() diff --git a/SOURCES/tuned-2.12-sap-hana-updated-tuning.patch b/SOURCES/tuned-2.12-sap-hana-updated-tuning.patch deleted file mode 100644 index 134573f..0000000 --- a/SOURCES/tuned-2.12-sap-hana-updated-tuning.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 52156a00b590ef401b38dcc65720b344d67e86f6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= -Date: Fri, 6 Dec 2019 16:37:11 +0100 -Subject: [PATCH] sap-hana: updated tuning -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Made sap-hana profile standalone. - -Resolves: rhbz#1779821 - -Signed-off-by: Jaroslav Škarvada ---- - man/tuned-profiles-sap-hana.7 | 10 ++++++---- - profiles/sap-hana/tuned.conf | 9 ++++++++- - 2 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/man/tuned-profiles-sap-hana.7 b/man/tuned-profiles-sap-hana.7 -index 3c3e7fe..d5648a3 100644 ---- a/man/tuned-profiles-sap-hana.7 -+++ b/man/tuned-profiles-sap-hana.7 -@@ -30,10 +30,12 @@ The following profiles are provided: - - .TP - .BI "sap\-hana" --A performance optimized profile for the SAP HANA applications. --It is based on throughput\-performance profile. It additionally disables --transparent hugepages, locks CPU to the low C states (by PM QoS) and tunes sysctl --regarding semaphores. -+A performance optimized profile for the SAP HANA applications. It disables -+power saving mechanisms and enables sysctl settings that improve throughput -+performance of disk and network IO. CPU governor is set to performance and CPU -+energy performance bias is set to performance. It also disables transparent -+hugepages, locks CPU to the low C states (by PM QoS) and tunes sysctl regarding -+semaphores. - - .SH "FILES" - .nf -diff --git a/profiles/sap-hana/tuned.conf b/profiles/sap-hana/tuned.conf -index d74250b..8305f65 100644 ---- a/profiles/sap-hana/tuned.conf -+++ b/profiles/sap-hana/tuned.conf -@@ -4,10 +4,12 @@ - - [main] - summary=Optimize for SAP HANA --include=throughput-performance - - [cpu] - force_latency=cstate.id:3|70 -+governor=performance -+energy_perf_bias=performance -+min_perf_pct=100 - - [vm] - transparent_hugepages=never -@@ -15,3 +17,8 @@ transparent_hugepages=never - [sysctl] - kernel.sem = 32000 1024000000 500 32000 - kernel.numa_balancing = 0 -+kernel.sched_min_granularity_ns = 3000000 -+kernel.sched_wakeup_granularity_ns = 4000000 -+vm.dirty_ratio = 40 -+vm.dirty_background_ratio = 10 -+vm.swappiness = 10 --- -2.21.0 - diff --git a/SOURCES/tuned-2.13.0-add-accelerator-performance-profile.patch b/SOURCES/tuned-2.13.0-add-accelerator-performance-profile.patch new file mode 100644 index 0000000..751fde9 --- /dev/null +++ b/SOURCES/tuned-2.13.0-add-accelerator-performance-profile.patch @@ -0,0 +1,103 @@ +From 9535680992da4509b22ba0bc9e3da58a21248e71 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Thu, 6 Feb 2020 17:39:22 +0100 +Subject: [PATCH] Add accelerator-performance profile +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Resolves: rhbz#1795604 + +Signed-off-by: Ondřej Lysoněk +--- + man/tuned-profiles.7 | 6 +++ + profiles/accelerator-performance/tuned.conf | 60 +++++++++++++++++++++ + 2 files changed, 66 insertions(+) + create mode 100644 profiles/accelerator-performance/tuned.conf + +diff --git a/man/tuned-profiles.7 b/man/tuned-profiles.7 +index 60a5dc9..aaf140b 100644 +--- a/man/tuned-profiles.7 ++++ b/man/tuned-profiles.7 +@@ -77,6 +77,12 @@ mechanisms and enables sysctl settings that improve the throughput performance + of your disk and network IO. CPU governor is set to performance and CPU energy + performance bias is set to performance. Disk readahead values are increased. + ++.TP ++.BI "accelerator\-performance" ++This profile contains the same tuning as the throughput\-performance profile. ++Additionally, it locks the CPU to low C states so that the latency is less than ++100us. This improves the performance of certain accelerators, such as GPUs. ++ + .TP + .BI "latency\-performance" + Profile for low latency performance tuning. Disables power saving mechanisms. +diff --git a/profiles/accelerator-performance/tuned.conf b/profiles/accelerator-performance/tuned.conf +new file mode 100644 +index 0000000..8068b3b +--- /dev/null ++++ b/profiles/accelerator-performance/tuned.conf +@@ -0,0 +1,60 @@ ++# ++# tuned configuration ++# ++ ++[main] ++summary=Throughput performance based tuning with disabled higher latency STOP states ++ ++[cpu] ++governor=performance ++energy_perf_bias=performance ++min_perf_pct=100 ++force_latency=99 ++ ++[disk] ++readahead=>4096 ++ ++[sysctl] ++# ktune sysctl settings for rhel6 servers, maximizing i/o throughput ++# ++# Minimal preemption granularity for CPU-bound tasks: ++# (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) ++kernel.sched_min_granularity_ns = 10000000 ++ ++# SCHED_OTHER wake-up granularity. ++# (default: 1 msec# (1 + ilog(ncpus)), units: nanoseconds) ++# ++# This option delays the preemption effects of decoupled workloads ++# and reduces their over-scheduling. Synchronous workloads will still ++# have immediate wakeup/sleep latencies. ++kernel.sched_wakeup_granularity_ns = 15000000 ++ ++# If a workload mostly uses anonymous memory and it hits this limit, the entire ++# working set is buffered for I/O, and any more write buffering would require ++# swapping, so it's time to throttle writes until I/O can catch up. Workloads ++# that mostly use file mappings may be able to use even higher values. ++# ++# The generator of dirty data starts writeback at this percentage (system default ++# is 20%) ++vm.dirty_ratio = 40 ++ ++# Start background writeback (via writeback threads) at this percentage (system ++# default is 10%) ++vm.dirty_background_ratio = 10 ++ ++# PID allocation wrap value. When the kernel's next PID value ++# reaches this value, it wraps back to a minimum PID value. ++# PIDs of value pid_max or larger are not allocated. ++# ++# A suggested value for pid_max is 1024 * <# of cpu cores/threads in system> ++# e.g., a box with 32 cpus, the default of 32768 is reasonable, for 64 cpus, ++# 65536, for 4096 cpus, 4194304 (which is the upper limit possible). ++#kernel.pid_max = 65536 ++ ++# The swappiness parameter controls the tendency of the kernel to move ++# processes out of physical memory and onto the swap disk. ++# 0 tells the kernel to avoid swapping processes out of physical memory ++# for as long as possible ++# 100 tells the kernel to aggressively swap processes out of physical memory ++# and move them to swap cache ++vm.swappiness=10 +-- +2.24.1 + diff --git a/SOURCES/tuned-2.13.0-define-variables-before-use.patch b/SOURCES/tuned-2.13.0-define-variables-before-use.patch new file mode 100644 index 0000000..9663311 --- /dev/null +++ b/SOURCES/tuned-2.13.0-define-variables-before-use.patch @@ -0,0 +1,72 @@ +From 0eb0c6bc7f48afe2f8c1f46ee7c9e7bb08db4163 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Mon, 6 Jan 2020 15:50:06 +0100 +Subject: [PATCH] profiles: Make sure variables are defined before use +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Make sure the isolated_cores and no_balance_cores variables are +defined before any of the variables that use them are defined. This +enforces a certain ordering of variable expansions so that child +profiles can set the variables directly in the profile (tuned.conf), +e.g.: + +[main] +include=cpu-partitioning + +[variables] +isolated_cores=3 + +Resolves: rhbz#1781664 + +Signed-off-by: Ondřej Lysoněk +--- + profiles/cpu-partitioning/tuned.conf | 8 ++++++++ + profiles/realtime/tuned.conf | 4 ++++ + 2 files changed, 12 insertions(+) + +diff --git a/profiles/cpu-partitioning/tuned.conf b/profiles/cpu-partitioning/tuned.conf +index 1821b74..5697750 100644 +--- a/profiles/cpu-partitioning/tuned.conf ++++ b/profiles/cpu-partitioning/tuned.conf +@@ -10,6 +10,10 @@ include=network-latency + include=/etc/tuned/cpu-partitioning-variables.conf + + isolated_cores_assert_check = \\${isolated_cores} ++# Make sure isolated_cores is defined before any of the variables that ++# use it (such as assert1) are defined, so that child profiles can set ++# isolated_cores directly in the profile (tuned.conf) ++isolated_cores = ${isolated_cores} + # Fail if isolated_cores are not set + assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}} + +@@ -22,6 +26,10 @@ not_isolated_cores_expanded=${f:cpulist_invert:${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}} ++# Make sure no_balance_cores is defined before ++# no_balance_cores_expanded is defined, so that child profiles can set ++# no_balance_cores directly in the profile (tuned.conf) ++no_balance_cores=${no_balance_cores} + no_balance_cores_expanded=${f:cpulist_unpack:${no_balance_cores}} + + # Fail if isolated_cores contains CPUs which are not online +diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf +index 6294d0c..6f5c5b1 100644 +--- a/profiles/realtime/tuned.conf ++++ b/profiles/realtime/tuned.conf +@@ -12,6 +12,10 @@ include = network-latency + include = /etc/tuned/realtime-variables.conf + + isolated_cores_assert_check = \\${isolated_cores} ++# Make sure isolated_cores is defined before any of the variables that ++# use it (such as assert1) are defined, so that child profiles can set ++# isolated_cores directly in the profile (tuned.conf) ++isolated_cores = ${isolated_cores} + # Fail if isolated_cores are not set + assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}} + +-- +2.21.1 + diff --git a/SOURCES/tuned-2.13.0-realtime-cond-support-for-managed_irq.patch b/SOURCES/tuned-2.13.0-realtime-cond-support-for-managed_irq.patch new file mode 100644 index 0000000..ab6b06c --- /dev/null +++ b/SOURCES/tuned-2.13.0-realtime-cond-support-for-managed_irq.patch @@ -0,0 +1,101 @@ +From 5ed61ce394bad089f86a0be4b911cd93eddeb1b3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Fri, 20 Mar 2020 18:02:46 +0100 +Subject: [PATCH] realtime: added conditional support for managed_irq +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Also added regex_search_ternary built-in function. + +It takes arguments in the following form: + STR1, REGEX, STR2, STR3 + +If REGEX matches STR1 (re.search is used), STR2 is returned, +if it doesn't match STR3 is returned. + +Example: +[variables] +foo=Y +bar=${f:regex_search_ternary:${foo}:\b[y,Y,1,t,T]\b:foo:bar} + +It will result in the 'foo' string stored in the '${bar}' variable. + +Resolves: rhbz#1797025 + +Signed-off-by: Jaroslav Škarvada +--- + profiles/realtime/realtime-variables.conf | 7 +++++++ + profiles/realtime/tuned.conf | 5 ++++- + .../function_regex_search_ternary.py | 21 +++++++++++++++++++ + 3 files changed, 32 insertions(+), 1 deletion(-) + create mode 100644 tuned/profiles/functions/function_regex_search_ternary.py + +diff --git a/profiles/realtime/realtime-variables.conf b/profiles/realtime/realtime-variables.conf +index b91e5f3..c2da595 100644 +--- a/profiles/realtime/realtime-variables.conf ++++ b/profiles/realtime/realtime-variables.conf +@@ -2,3 +2,10 @@ + # isolated_cores=2,4-7 + # isolated_cores=2-23 + # ++# ++# Uncomment the 'isolate_managed_irq=Y' bellow if you want to move kernel ++# managed IRQs out of isolated cores. Note that this requires kernel ++# support. Please only specify this parameter if you are sure that the ++# kernel supports it. ++# ++# isolate_managed_irq=Y +diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf +index 6f5c5b1..a22ffdd 100644 +--- a/profiles/realtime/tuned.conf ++++ b/profiles/realtime/tuned.conf +@@ -28,6 +28,9 @@ isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}} + # 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}} + ++# Assembly managed_irq ++managed_irq=${f:regex_search_ternary:${isolate_managed_irq}:\b[y,Y,1,t,T]\b:managed_irq,domain,:} ++ + [sysctl] + kernel.hung_task_timeout_secs = 600 + kernel.nmi_watchdog = 0 +@@ -41,7 +44,7 @@ kernel.timer_migration = 0 + /sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1 + + [bootloader] +-cmdline_realtime=+isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup tsc=nowatchdog ++cmdline_realtime=+isolcpus=${managed_irq}${isolated_cores} intel_pstate=disable nosoftlockup tsc=nowatchdog + + [script] + script = ${i:PROFILE_DIR}/script.sh +diff --git a/tuned/profiles/functions/function_regex_search_ternary.py b/tuned/profiles/functions/function_regex_search_ternary.py +new file mode 100644 +index 0000000..42c4567 +--- /dev/null ++++ b/tuned/profiles/functions/function_regex_search_ternary.py +@@ -0,0 +1,21 @@ ++import re ++from . import base ++ ++class regex_search_ternary(base.Function): ++ """ ++ Ternary regex operator, it takes arguments in the following form ++ STR1, REGEX, STR2, STR3 ++ If REGEX matches STR1 (re.search is used), STR2 is returned, ++ otherwise STR3 is returned ++ """ ++ def __init__(self): ++ # 4 arguments ++ super(regex_search_ternary, self).__init__("regex_search_ternary", 4) ++ ++ def execute(self, args): ++ if not super(regex_search_ternary, self).execute(args): ++ return None ++ if re.search(args[1], args[0]): ++ return args[2] ++ else: ++ return args[3] +-- +2.21.1 + diff --git a/SOURCES/tuned-2.13.0-rename-sst-to-intel-sst.patch b/SOURCES/tuned-2.13.0-rename-sst-to-intel-sst.patch new file mode 100644 index 0000000..8d9b43c --- /dev/null +++ b/SOURCES/tuned-2.13.0-rename-sst-to-intel-sst.patch @@ -0,0 +1,53 @@ +From 20a71af333bcfb4110319b2f626fbfcb1d30870f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= +Date: Tue, 11 Feb 2020 17:44:06 +0100 +Subject: [PATCH] profiles: renamed sst profile to intel-sst +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Also updated intel-sst profile manual page describing its usage. + +Related: rhbz#1743879 + +Signed-off-by: Jaroslav Škarvada +--- + man/tuned-profiles.7 | 6 ++++-- + profiles/{sst => intel-sst}/tuned.conf | 2 +- + 2 files changed, 5 insertions(+), 3 deletions(-) + rename profiles/{sst => intel-sst}/tuned.conf (65%) + +diff --git a/man/tuned-profiles.7 b/man/tuned-profiles.7 +index aaf140b..8e536c2 100644 +--- a/man/tuned-profiles.7 ++++ b/man/tuned-profiles.7 +@@ -122,9 +122,11 @@ Profile optimized for virtual hosts based on throughput\-performance profile. + It additionally enables more aggressive writeback of dirty pages. + + .TP +-.BI "sst" ++.BI "intel-sst" + Profile optimized for systems with user-defined Intel Speed Select Technology +-configurations. ++configurations. This profile is intended to be used as an overlay on other ++profiles (e.g. cpu\-partitioning profile), example: ++.B tuned\-adm profile cpu\-partitioning intel-sst + + .SH "FILES" + .nf +diff --git a/profiles/sst/tuned.conf b/profiles/intel-sst/tuned.conf +similarity index 65% +rename from profiles/sst/tuned.conf +rename to profiles/intel-sst/tuned.conf +index 4566813..c520534 100644 +--- a/profiles/sst/tuned.conf ++++ b/profiles/intel-sst/tuned.conf +@@ -2,4 +2,4 @@ + summary=Configure for Intel Speed Select Base Frequency + + [bootloader] +-cmdline_sst=-intel_pstate=disable ++cmdline_intel_sst=-intel_pstate=disable +-- +2.21.1 + diff --git a/SOURCES/tuned-2.13.0-use-ncat.patch b/SOURCES/tuned-2.13.0-use-ncat.patch new file mode 100644 index 0000000..7ff0b0a --- /dev/null +++ b/SOURCES/tuned-2.13.0-use-ncat.patch @@ -0,0 +1,16 @@ +diff --git a/profiles/realtime-virtual-host/script.sh b/profiles/realtime-virtual-host/script.sh +index c0d5d9e..edae6c5 100755 +--- a/profiles/realtime-virtual-host/script.sh ++++ b/profiles/realtime-virtual-host/script.sh +@@ -29,9 +29,9 @@ run_tsc_deadline_latency() + -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"` ++ pidofvcpu=`echo "info cpus" | ncat -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 ++ echo "cont" | ncat -U $unixpath >/dev/null + wait + + if [ ! -f $dir/out ]; then diff --git a/SPECS/tuned.spec b/SPECS/tuned.spec index c8841f7..62832e1 100644 --- a/SPECS/tuned.spec +++ b/SPECS/tuned.spec @@ -33,8 +33,8 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned -Version: 2.12.0 -Release: 3%{?prerel1}%{?dist}.1 +Version: 2.13.0 +Release: 6%{?prerel1}%{?dist} License: GPLv2+ Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz # RHEL-8 specific recommend.conf: @@ -46,14 +46,26 @@ Requires(post): systemd, virt-what Requires(preun): systemd Requires(postun): systemd BuildRequires: %{_py}, %{_py}-devel +# BuildRequires for 'make test' +BuildRequires: %{_py}-unittest2, %{_py}-configobj, %{_py}-mock +BuildRequires: %{_py}-decorator, %{_py}-pyudev Requires: %{_py}-decorator, %{_py}-pyudev, %{_py}-configobj Requires: %{_py}-schedutils, %{_py}-linux-procfs, %{_py}-perf # requires for packages with inconsistent python2/3 names %if %{with python3} +# BuildRequires for 'make test' +BuildRequires: python3-dbus, python3-gobject-base Requires: python3-dbus, python3-gobject-base +%if 0%{?fedora} > 22 || 0%{?rhel} > 7 Recommends: python3-dmidecode +%endif %else +# BuildRequires for 'make test' +BuildRequires: dbus-python, pygobject3-base Requires: dbus-python, pygobject3-base +%if 0%{?fedora} > 22 || 0%{?rhel} > 7 +Recommends: python-dmidecode +%endif %endif Requires: virt-what, ethtool, gawk, hdparm Requires: util-linux, dbus, polkit @@ -63,8 +75,11 @@ Recommends: kernel-tools %if 0%{?rhel} > 7 Requires: python3-syspurpose %endif -Patch0: tuned-2.12-latency-as-cstate.patch -Patch1: tuned-2.12-sap-hana-updated-tuning.patch +Patch0: tuned-2.13.0-define-variables-before-use.patch +Patch1: tuned-2.13.0-use-ncat.patch +Patch2: tuned-2.13.0-add-accelerator-performance-profile.patch +Patch3: tuned-2.13.0-rename-sst-to-intel-sst.patch +Patch4: tuned-2.13.0-realtime-cond-support-for-managed_irq.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -173,6 +188,7 @@ Summary: Additional tuned profile(s) targeted to Network Function Virtualization Requires: %{name} = %{version} Requires: %{name}-profiles-realtime = %{version} Requires: tuna +Requires: nmap-ncat %if 0%{?rhel} == 7 Requires: qemu-kvm-tools-rhev %else @@ -211,6 +227,9 @@ It can be also used to fine tune your system for specific scenarios. %setup -q -n %{name}-%{version}%{?prerel2} %patch0 -p1 %patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 # Replace the upstream recommend.conf with a RHEL-8-specific one rm -f recommend.conf @@ -240,6 +259,9 @@ touch %{buildroot}%{_sysconfdir}/modprobe.d/kvm.rt.tuned.conf # validate desktop file desktop-file-validate %{buildroot}%{_datadir}/applications/tuned-gui.desktop +%check +make test + %post %systemd_post tuned.service @@ -456,9 +478,53 @@ fi %{_mandir}/man7/tuned-profiles-compat.7* %changelog -* Wed Dec 11 2019 Jaroslav Škarvada - 2.12.0-3.1 -- sap-hana: updated tuning - resolves: rhbz#1780682 +* Mon Mar 23 2020 Jaroslav Škarvada - 2.13.0-6 +- realtime: added conditional support for managed_irq + Resolves: rhbz#1797025 + +* Wed Feb 12 2020 Jaroslav Škarvada - 2.13.0-5 +- profiles: renamed sst profile to intel-sst + related: rhbz#1743879 + +* Fri Feb 07 2020 Ondřej Lysoněk - 2.13.0-4 +- Add accelerator-performance profile +- Resolves: rhbz#1795604 + +* Tue Jan 14 2020 Jaroslav Škarvada - 2.13.0-3 +- tuned-profiles-nfv-host: added ncat requirement + resolves: rhbz#1779117 + +* Tue Jan 7 2020 Jaroslav Škarvada - 2.13.0-2 +- profiles: define variables before use + resolves: rhbz#1788102 + +* Wed Dec 11 2019 Jaroslav Škarvada - 2.13.0-1 +- new release + - rebased tuned to latest upstream + related: rhbz#1738250 + - sap-hana: updated tuning + resolves: rhbz#1779821 + - latency-performance: updated tuning + resolves: rhbz#1779759 + +* Sun Dec 1 2019 Jaroslav Škarvada - 2.13.0-0.1.rc1 +- new release + - rebased tuned to latest upstream + resolves: rhbz#1738250 + - cpu: fixed checking if EPB is supported + resolves: rhbz#1690929 + - scheduler: fixed IRQ SMP affinity verification to respect ignore_missing + resolves: rhbz#1729936 + - realtime: enabled ktimer_lockless_check + resolves: rhbz#1734096 + - plugins: support cpuinfo_regex and uname_regex matching + resolves: rhbz#1748965 + - sysctl: made reapply_sysctl ignore configs from /usr + resolves: rhbz#1759597 + - added support for multiple include directives + resolves: rhbz#1760390 + - realtime: added nowatchdog kernel command line option + resolves: rhbz#1767614 * Fri Aug 16 2019 Jaroslav Škarvada - 2.12.0-3 - used C-states in latency specification