From 220822bd2f6eb51512206c33e194676d7c55a4ad Mon Sep 17 00:00:00 2001 From: Jan Zerdik Date: Tue, 9 Feb 2021 14:07:22 +0100 Subject: [PATCH] used RHEL recommend.conf resolves: rhbz#1921016 --- recommend.conf | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ tuned.spec | 12 +++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 recommend.conf diff --git a/recommend.conf b/recommend.conf new file mode 100644 index 0000000..9d32962 --- /dev/null +++ b/recommend.conf @@ -0,0 +1,61 @@ +# Tuned rules for recommend_profile. +# +# Syntax: +# [PROFILE1] +# KEYWORD11=RE11 +# KEYWORD21=RE12 +# +# [PROFILE2] +# KEYWORD21=RE21 +# KEYWORD22=RE22 + +# KEYWORD can be: +# virt - for RE to match output of virt-what +# system - for RE to match content of /etc/system-release-cpe +# process - for RE to match running processes. It can have arbitrary +# suffix, all process* lines have to match for the PROFILE +# to match (i.e. the AND operator) +# /FILE - for RE to match content of the FILE, e.g.: +# '/etc/passwd=.+'. If file doesn't exist, its RE will not +# match. +# chassis_type - for RE to match the chassis type as reported by dmidecode +# syspurpose_role - for RE to match the system role as reported by syspurpose + +# All REs for all KEYWORDs have to match for PROFILE to match (i.e. the AND operator). +# If 'virt' or 'system' is not specified, it matches for every string. +# If 'virt' or 'system' is empty, i.e. 'virt=', it matches only empty string (alias for '^$'). +# If several profiles matched, the first match is taken. +# +# Limitation: +# Each profile can be specified only once, because there cannot be +# multiple sections in the configuration file with the same name +# (ConfigObj limitation). +# If there is a need to specify the profile multiple times, unique +# suffix like ',ANYSTRING' can be used. Everything after the last ',' +# is stripped by the parser, e.g.: +# +# [balanced,1] +# /FILE1=RE1 +# +# [balanced,2] +# /FILE2=RE2 +# +# This will set 'balanced' profile in case there is FILE1 matching RE1 or +# FILE2 matching RE2 or both. + +[atomic-host] +virt= +syspurpose_role=.*atomic.* + +[atomic-guest] +virt=.+ +syspurpose_role=.*atomic.* + +[virtual-guest] +virt=.+ + +[balanced] +syspurpose_role=(.*(desktop|workstation).*)|^$ +chassis_type=.*(Notebook|Laptop|Portable).* + +[throughput-performance] diff --git a/tuned.spec b/tuned.spec index d05469f..56c54be 100644 --- a/tuned.spec +++ b/tuned.spec @@ -34,9 +34,11 @@ Summary: A dynamic adaptive system tuning daemon Name: tuned Version: 2.15.0 -Release: 2%{?prerel1}%{?dist} +Release: 3%{?prerel1}%{?dist} License: GPLv2+ Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz +# RHEL-9 specific recommend.conf: +Source1: recommend.conf URL: http://www.tuned-project.org/ BuildArch: noarch BuildRequires: make @@ -234,6 +236,10 @@ Additional tuned profile(s) targeted to PostgreSQL server loads. %prep %autosetup -p1 -n %{name}-%{version}%{?prerel2} +# Replace the upstream recommend.conf with a RHEL-9-specific one +rm -f recommend.conf +cp -p %{SOURCE1} recommend.conf + %build # Docs cannot be generated on RHEL now due to missing asciidoctor dependency # asciidoc doesn't seem to be compatible @@ -511,6 +517,10 @@ fi %{_mandir}/man7/tuned-profiles-postgresql.7* %changelog +* Mon Feb 08 2021 Jan Zerdik - 2.15.0-3 +- used RHEL recommend.conf + resolves: rhbz#1921016 + * Wed Jan 27 2021 Fedora Release Engineering - 2.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild