realtime: set tsc as reliable

resolves: rhbz#2086374
This commit is contained in:
Jaroslav Škarvada 2022-05-19 19:14:39 +02:00
parent abc73725b5
commit 500c18046a
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From 49cc817871672d0a5bad138dd7ad781b684a9fd9 Mon Sep 17 00:00:00 2001
From: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Date: Wed, 16 Mar 2022 17:06:45 +0100
Subject: [PATCH] realtime: Set tsc as 'reliable'
We already disable the clocksource watchdog, it's there to double-check
whether clock results are coherent between reads. But a new reliability
test was introduced in recent kernels[1], tracking tsc drift between
CPUs[2]. It works by programming timers on all CPUs, including isolated
ones, and checks whether the tsc was adjusted in between runs. This
introduces unwarranted latency on real time systems. So let's promote
tsc to 'reliable', which disables both checks.
There shouldn't be any impact on old nor new setups. First, this test
didn't exist in the past, so any eventual drift was left uncorrected.
Second, most telco and HPC use-cases will make heavy use of tsc in
user-space, and its reliability is already assumed in the system's
design.
[1] c7719e793478 x86/tsc: Add a timer to make sure TSC_adjust is always
checked
[2] Generally caused by rogue BIOSes adjusting the tsc on a CPU and not
doing so on the rest
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
---
profiles/realtime/tuned.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf
index b1657af..196ed01 100644
--- a/profiles/realtime/tuned.conf
+++ b/profiles/realtime/tuned.conf
@@ -52,7 +52,7 @@ kernel.timer_migration = 0
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
[bootloader]
-cmdline_realtime=+isolcpus=${managed_irq}${isolated_cores} intel_pstate=disable nosoftlockup tsc=nowatchdog
+cmdline_realtime=+isolcpus=${managed_irq}${isolated_cores} intel_pstate=disable nosoftlockup tsc=reliable
[irqbalance]
banned_cpus=${isolated_cores}
--
2.35.1

View File

@ -35,7 +35,7 @@
Summary: A dynamic adaptive system tuning daemon
Name: tuned
Version: 2.18.0
Release: 1%{?prerel1}%{?dist}
Release: 2%{?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:
@ -97,6 +97,7 @@ Recommends: subscription-manager
Requires: python3-syspurpose
%endif
%endif
Patch0: tuned-2.18.0-realtime-tsc-reliable.patch
%description
The tuned package contains a daemon that tunes system settings dynamically.
@ -548,6 +549,10 @@ fi
%{_mandir}/man7/tuned-profiles-openshift.7*
%changelog
* Thu May 19 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 2.18.0-2
- realtime: set tsc as reliable
resolves: rhbz#2086374
* Wed Feb 9 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 2.18.0-1
- new release
- rebased tuned to latest upstream