tuned: request performance cpu governor

Problem:
StarlingX uses the balanced tuned profile. This is not exactly
what we want as the balanced profile attempts to set the cpu
governor to conservative. With the 3.10 kernel and drivers in
place, we were getting away with this as the request to set the
governor to conservative fails because the scaling driver (intel_pstate)
doesn't support it. This failure leaves the performance governor
in place, which is the cpu governor that we actually want.

With the 5.10 kernel and drivers, the scaling driver (intel_cpufreq)
does support conservative, so we end up with that governor which
trades off performance for power savings, instead of the desired
performance governor.

Solution:
Create a new starlingx tuned profile from the balanced profile,
but change its governor setting to performance instead of
conservative.  This leaves the tuned behavior exactly as it was
before.  This new starlingx tuned profile gives us greater flexibility
as we can adjust it in the future to suit our specific needs.

We also introduce a new recommend.conf to select the new starlingx
profile.  We give this new file rpm type noreplace.  This
allows the end user to change it to select a different profile
without us overwriting their change on a package upgrade.  The
starlingx profile config however we will potentially overwrite on
an upgrade as an end user shouldn't be modifying it.  They
should create their own profile if they feel such a need.

Change-Id: Ib249aa63326a4018e1accfdef8b622dcad9ab03d
Closes-Bug: 1944392
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
This commit is contained in:
Jim Somerville 2021-09-20 17:15:31 -04:00
parent a00d230658
commit 41ddfafd46
3 changed files with 36 additions and 0 deletions

View File

@ -23,9 +23,15 @@ StarlingX tuned configuration file
%install
install -d -m 755 %{buildroot}%{_sysconfdir}/systemd/system/tuned.service.d/
install -p -m 644 tuned-stx-override.conf %{buildroot}%{_sysconfdir}/systemd/system/tuned.service.d/
install -d -m 755 %{buildroot}%{_sysconfdir}/tuned/starlingx/
install -p -m 644 tuned.conf %{buildroot}%{_sysconfdir}/tuned/starlingx/
install -p -m 644 recommend.conf %{buildroot}%{_sysconfdir}/tuned/
%files
%defattr(-,root,root)
%license LICENSE
%dir %{_sysconfdir}/systemd/system/tuned.service.d
%{_sysconfdir}/systemd/system/tuned.service.d/tuned-stx-override.conf
%dir %{_sysconfdir}/tuned/starlingx
%config %{_sysconfdir}/tuned/starlingx/tuned.conf
%config(noreplace) %{_sysconfdir}/tuned/recommend.conf

View File

@ -0,0 +1 @@
[starlingx]

View File

@ -0,0 +1,29 @@
#
# tuned configuration for StarlingX
#
# Local changes to this profile are not guaranteed to
# be preserved across upgrades. If you need to change
# these settings then either use another existing
# profile that has what you need or create your own.
# Also be mindful that puppet may change sysctl variables
# during host unlock.
[main]
summary=StarlingX tuned profile, mostly favors performance over power
[cpu]
governor=performance
energy_perf_bias=normal
[audio]
timeout=10
[video]
radeon_powersave=auto
[disk]
# Comma separated list of devices, all devices if commented out.
# devices=sda
[scsi_host]
alpm=medium_power