From 505ac3d9d5a5adbb7cae5ce1156fee3ffa43781f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sat, 5 Feb 2022 05:29:21 +0000 Subject: [PATCH] import tuned-2.18.0-0.1.rc1.el8 --- .gitignore | 2 +- .tuned.metadata | 2 +- ...tch => tuned-2.18.0-rhel-8-profiles.patch} | 8 +- SOURCES/tuned-2.18.0-sd-load-balance.patch | 80 +++++++++++++++++++ SPECS/tuned.spec | 67 +++++++++++++--- 5 files changed, 142 insertions(+), 17 deletions(-) rename SOURCES/{tuned-2.16.0-rhel-8-profiles.patch => tuned-2.18.0-rhel-8-profiles.patch} (95%) create mode 100644 SOURCES/tuned-2.18.0-sd-load-balance.patch diff --git a/.gitignore b/.gitignore index 8f9b96c..0faad32 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/tuned-2.16.0.tar.gz +SOURCES/tuned-2.18.0-rc.1.tar.gz diff --git a/.tuned.metadata b/.tuned.metadata index 2d7f88a..fd33721 100644 --- a/.tuned.metadata +++ b/.tuned.metadata @@ -1 +1 @@ -e20fcfb734f869fb175cb88dc7ef6e5eb3cd5946 SOURCES/tuned-2.16.0.tar.gz +ec1e0e956fb804da8e7b80a673dcea93b3ee99bf SOURCES/tuned-2.18.0-rc.1.tar.gz diff --git a/SOURCES/tuned-2.16.0-rhel-8-profiles.patch b/SOURCES/tuned-2.18.0-rhel-8-profiles.patch similarity index 95% rename from SOURCES/tuned-2.16.0-rhel-8-profiles.patch rename to SOURCES/tuned-2.18.0-rhel-8-profiles.patch index e357432..d1d5750 100644 --- a/SOURCES/tuned-2.16.0-rhel-8-profiles.patch +++ b/SOURCES/tuned-2.18.0-rhel-8-profiles.patch @@ -1,5 +1,5 @@ diff --git a/profiles/latency-performance/tuned.conf b/profiles/latency-performance/tuned.conf -index da1e357..66f06ae 100644 +index d200b5c..877229f 100644 --- a/profiles/latency-performance/tuned.conf +++ b/profiles/latency-performance/tuned.conf @@ -32,3 +32,16 @@ vm.dirty_background_ratio=3 @@ -20,7 +20,7 @@ index da1e357..66f06ae 100644 +# (system default is 500000, i.e. 0.5 ms) +sched_migration_cost_ns = 5000000 diff --git a/profiles/sap-hana/tuned.conf b/profiles/sap-hana/tuned.conf -index 81d5930..c91a9ee 100644 +index aeecf53..8dcee57 100644 --- a/profiles/sap-hana/tuned.conf +++ b/profiles/sap-hana/tuned.conf @@ -20,3 +20,7 @@ kernel.numa_balancing = 0 @@ -68,13 +68,13 @@ index 98c6b26..ebb3f7d 100644 +cpuinfo_regex=${amd_cpuinfo_regex} +sched_migration_cost_ns=5000000 diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf -index c1942da..3358105 100644 +index 5301d9f..74a5fb0 100644 --- a/profiles/virtual-host/tuned.conf +++ b/profiles/virtual-host/tuned.conf @@ -14,3 +14,9 @@ vm.dirty_background_ratio = 5 [cpu] # Setting C3 state sleep mode/power savings - force_latency=cstate.id:3|70 + force_latency=cstate.id_no_zero:3|70 + +[scheduler] +# The total time the scheduler will consider a migrated process diff --git a/SOURCES/tuned-2.18.0-sd-load-balance.patch b/SOURCES/tuned-2.18.0-sd-load-balance.patch new file mode 100644 index 0000000..d42600c --- /dev/null +++ b/SOURCES/tuned-2.18.0-sd-load-balance.patch @@ -0,0 +1,80 @@ +diff --git a/profiles/cpu-partitioning/script.sh b/profiles/cpu-partitioning/script.sh +index 84e04fd..8677050 100755 +--- a/profiles/cpu-partitioning/script.sh ++++ b/profiles/cpu-partitioning/script.sh +@@ -2,6 +2,38 @@ + + . /usr/lib/tuned/functions + ++no_balance_cpus_file=$STORAGE/no-balance-cpus.txt ++ ++change_sd_balance_bit() ++{ ++ local set_bit=$1 ++ local flags_cur= ++ local file= ++ local cpu= ++ ++ for cpu in $(cat $no_balance_cpus_file); do ++ for file in $(find /proc/sys/kernel/sched_domain/cpu$cpu -name flags -print); do ++ flags_cur=$(cat $file) ++ if [ $set_bit -eq 1 ]; then ++ flags_cur=$((flags_cur | 0x1)) ++ else ++ flags_cur=$((flags_cur & 0xfffe)) ++ fi ++ echo $flags_cur > $file ++ done ++ done ++} ++ ++disable_balance_domains() ++{ ++ change_sd_balance_bit 0 ++} ++ ++enable_balance_domains() ++{ ++ change_sd_balance_bit 1 ++} ++ + start() { + mkdir -p "${TUNED_tmpdir}/etc/systemd" + mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev" +@@ -9,6 +41,9 @@ start() { + cp 00-tuned-pre-udev.sh "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev/" + setup_kvm_mod_low_latency + disable_ksm ++ ++ echo "$TUNED_no_balance_cores_expanded" | sed 's/,/ /g' > $no_balance_cpus_file ++ disable_balance_domains + return "$?" + } + +@@ -18,6 +53,7 @@ stop() { + teardown_kvm_mod_low_latency + enable_ksm + fi ++ enable_balance_domains + return "$?" + } + +diff --git a/profiles/cpu-partitioning/tuned.conf b/profiles/cpu-partitioning/tuned.conf +index 979e40b..842e2bd 100644 +--- a/profiles/cpu-partitioning/tuned.conf ++++ b/profiles/cpu-partitioning/tuned.conf +@@ -35,8 +35,6 @@ no_balance_cores_expanded=${f:cpulist_unpack:${no_balance_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}} + +-cmd_isolcpus=${f:regex_search_ternary:${no_balance_cores}:\s*[0-9]: isolcpus=${no_balance_cores}:} +- + [sysctl] + kernel.hung_task_timeout_secs = 600 + kernel.nmi_watchdog = 0 +@@ -68,4 +66,4 @@ priority=10 + initrd_remove_dir=True + initrd_dst_img=tuned-initrd.img + initrd_add_dir=${tmpdir} +-cmdline_cpu_part=+nohz=on${cmd_isolcpus} nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} tuned.non_isolcpus=${not_isolated_cpumask} intel_pstate=disable nosoftlockup ++cmdline_cpu_part=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} tuned.non_isolcpus=${not_isolated_cpumask} intel_pstate=disable nosoftlockup diff --git a/SPECS/tuned.spec b/SPECS/tuned.spec index df515ab..8ca3347 100644 --- a/SPECS/tuned.spec +++ b/SPECS/tuned.spec @@ -17,24 +17,25 @@ %global make_python_arg PYTHON=%{__python3} %else %{!?python2_sitelib:%global python2_sitelib %{python_sitelib}} -%global make_python_arg PYTHON=%{__python2} %if 0%{?rhel} && 0%{?rhel} < 8 +%global make_python_arg PYTHON=%{__python} %global _py python %else +%global make_python_arg PYTHON=%{__python2} %global _py python2 %endif %endif -#%%global prerelease rc -#%%global prereleasenum 1 +%global prerelease rc +%global prereleasenum 1 %global prerel1 %{?prerelease:.%{prerelease}%{prereleasenum}} %global prerel2 %{?prerelease:-%{prerelease}.%{prereleasenum}} Summary: A dynamic adaptive system tuning daemon Name: tuned -Version: 2.16.0 -Release: 1%{?prerel1}%{?dist} +Version: 2.18.0 +Release: 0.1%{?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: @@ -48,10 +49,16 @@ Requires(postun): systemd BuildRequires: make BuildRequires: %{_py}, %{_py}-devel # BuildRequires for 'make test' -BuildRequires: %{_py}-unittest2, %{_py}-configobj, %{_py}-mock +# python-mock is needed for python-2.7, but it's not available on RHEL-7 +%if %{without python3} && ( ! 0%{?rhel} || 0%{?rhel} >= 8 ) +BuildRequires: %{_py}-mock +%endif BuildRequires: %{_py}-pyudev -Requires: %{_py}-pyudev, %{_py}-configobj +Requires: %{_py}-pyudev Requires: %{_py}-linux-procfs, %{_py}-perf +%if %{without python3} +Requires: %{_py}-schedutils +%endif # requires for packages with inconsistent python2/3 names %if %{with python3} # BuildRequires for 'make test' @@ -72,17 +79,23 @@ Recommends: dmidecode Recommends: hdparm Recommends: kernel-tools Recommends: kmod +Recommends: iproute %endif # syspurpose %if 0%{?rhel} > 8 -Requires: subscription-manager +# not on CentOS +%if 0%{!?centos:1} +Recommends: subscription-manager +%endif %else %if 0%{?rhel} > 7 Requires: python3-syspurpose %endif %endif # Revert upstream profiles changes which have not been approved for RHEL-8 (yet) -Patch0: tuned-2.16.0-rhel-8-profiles.patch +Patch0: tuned-2.18.0-rhel-8-profiles.patch +# Revert no balancing cores to use SD_LOAD_BALANCE (see rhbz#1874596 for details) +Patch1: tuned-2.18.0-sd-load-balance.patch %description The tuned package contains a daemon that tunes system settings dynamically. @@ -235,9 +248,15 @@ Requires: %{name} = %{version} %description profiles-postgresql Additional tuned profile(s) targeted to PostgreSQL server loads. +%package profiles-openshift +Summary: Additional TuneD profile(s) optimized for OpenShift +Requires: %{name} = %{version} + +%description profiles-openshift +Additional TuneD profile(s) optimized for OpenShift. + %prep -%setup -q -n %{name}-%{version}%{?prerel2} -%patch0 -p1 +%autosetup -p1 -n %{name}-%{version}%{?prerel2} # Replace the upstream recommend.conf with a RHEL-8-specific one rm -f recommend.conf @@ -401,6 +420,9 @@ fi %exclude %{_prefix}/lib/tuned/cpu-partitioning %exclude %{_prefix}/lib/tuned/spectrumscale-ece %exclude %{_prefix}/lib/tuned/postgresql +%exclude %{_prefix}/lib/tuned/openshift +%exclude %{_prefix}/lib/tuned/openshift-control-plane +%exclude %{_prefix}/lib/tuned/openshift-node %{_prefix}/lib/tuned %dir %{_sysconfdir}/tuned %dir %{_sysconfdir}/tuned/recommend.d @@ -518,7 +540,30 @@ fi %{_prefix}/lib/tuned/postgresql %{_mandir}/man7/tuned-profiles-postgresql.7* +%files profiles-openshift +%{_prefix}/lib/tuned/openshift +%{_prefix}/lib/tuned/openshift-control-plane +%{_prefix}/lib/tuned/openshift-node +%{_mandir}/man7/tuned-profiles-openshift.7* + %changelog +* Wed Feb 2 2022 Jaroslav Škarvada - 2.18.0-0.1.rc1 +- new release + - rebased tuned to latest upstream + resolves: rhbz#2003833 + - profiles: fix improper parsing of include directive + resolves: rhbz#2017924 + - disk: added support for the nvme + resolves: rhbz#1854816 + - cpu: extended cstate force_latency syntax to allow skipping zero latency + resolves: rhbz#2002744 + - net: added support for the txqueuelen + resolves: rhbz#2015044 + - bootloader: on s390(x) remove TuneD variables from the BLS + resolves: rhbz#1978786 + - daemon: don't do full rollback on systemd failure + resolves: rhbz#2011459 + * Wed Jul 21 2021 Jaroslav Škarvada - 2.16.0-1 - new release - rebased tuned to latest upstream