From ae7bbabb1b1766d975a8b00bf1fd80ea17e14d34 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <email@example.com> Date: Tue, 28 Sep 2021 14:24:27 +0200 Subject: [PATCH 069/166] sched: Disable TTWU_QUEUE on RT The queued remote wakeup mechanism has turned out to be suboptimal for RT enabled kernels. The maximum latencies go up by a factor of > 5x in certain scenarious. This is caused by either long wake lists or by a large number of TTWU IPIs which are processed back to back. Disable it for RT. Signed-off-by: Thomas Gleixner <firstname.lastname@example.org> Signed-off-by: Sebastian Andrzej Siewior <email@example.com> Link: https://firstname.lastname@example.org --- kernel/sched/features.h | 5 +++++ 1 file changed, 5 insertions(+) Index: linux-5.15.32-rt39/kernel/sched/features.h =================================================================== @ linux-5.15.32-rt39/kernel/sched/features.h:49 @ SCHED_FEAT(DOUBLE_TICK, false) */ SCHED_FEAT(NONTASK_CAPACITY, true) +#ifdef CONFIG_PREEMPT_RT +SCHED_FEAT(TTWU_QUEUE, false) +#else + /* * Queue remote wakeups on the target CPU and process them * using the scheduler IPI. Reduces rq->lock contention/bounces. */ SCHED_FEAT(TTWU_QUEUE, true) +#endif /* * When doing wakeups, attempt to limit superfluous scans of the LLC domain.