diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:28:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-11 08:28:00 +0000 |
commit | 3565071f226432336a54d0193d729fa4508a3394 (patch) | |
tree | 4cde13f078f84c0a7785d234fd52edce7c90546a /debian/patches-rt/softirq-Wake-ktimers-thread-also-in-softirq.patch | |
parent | Adding upstream version 6.6.15. (diff) | |
download | linux-3565071f226432336a54d0193d729fa4508a3394.tar.xz linux-3565071f226432336a54d0193d729fa4508a3394.zip |
Adding debian version 6.6.15-2.debian/6.6.15-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/patches-rt/softirq-Wake-ktimers-thread-also-in-softirq.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches-rt/softirq-Wake-ktimers-thread-also-in-softirq.patch b/debian/patches-rt/softirq-Wake-ktimers-thread-also-in-softirq.patch new file mode 100644 index 0000000000..21609fe207 --- /dev/null +++ b/debian/patches-rt/softirq-Wake-ktimers-thread-also-in-softirq.patch @@ -0,0 +1,44 @@ +From: Junxiao Chang <junxiao.chang@intel.com> +Date: Mon, 20 Feb 2023 09:12:20 +0100 +Subject: [PATCH] softirq: Wake ktimers thread also in softirq. +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/6.6/older/patches-6.6.7-rt18.tar.xz + +If the hrtimer is raised while a softirq is processed then it does not +wake the corresponding ktimers thread. This is due to the optimisation in the +irq-exit path which is also used to wake the ktimers thread. For the other +softirqs, this is okay because the additional softirq bits will be handled by +the currently running softirq handler. +The timer related softirq bits are added to a different variable and rely on +the ktimers thread. +As a consuequence the wake up of ktimersd is delayed until the next timer tick. + +Always wake the ktimers thread if a timer related softirq is pending. + +Reported-by: Peh, Hock Zhang <hock.zhang.peh@intel.com> +Signed-off-by: Junxiao Chang <junxiao.chang@intel.com> +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/softirq.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/kernel/softirq.c ++++ b/kernel/softirq.c +@@ -646,13 +646,12 @@ static inline void __irq_exit_rcu(void) + #endif + account_hardirq_exit(current); + preempt_count_sub(HARDIRQ_OFFSET); +- if (!in_interrupt()) { +- if (local_softirq_pending()) +- invoke_softirq(); ++ if (!in_interrupt() && local_softirq_pending()) ++ invoke_softirq(); + +- if (IS_ENABLED(CONFIG_PREEMPT_RT) && local_pending_timers()) +- wake_timersd(); +- } ++ if (IS_ENABLED(CONFIG_PREEMPT_RT) && local_pending_timers() && ++ !(in_nmi() | in_hardirq())) ++ wake_timersd(); + + tick_irq_exit(); + } |