diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2022-03-09 15:19:50 +0100 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2022-03-09 15:19:50 +0100 |
commit | db4867922beb5c769103bb4aae58366fdcd6b020 (patch) | |
tree | d22b194645cae9c4d6142a2f80c3958ca82390fa | |
parent | 509ec2586094ccac495974c27e7f153f37c3603f (diff) | |
download | linux-rt-db4867922beb5c769103bb4aae58366fdcd6b020.tar.gz |
[ANNOUNCE] v5.17-rc7-rt13v5.17-rc7-rt13-patches
Dear RT folks!
I'm pleased to announce the v5.17-rc7-rt13 patch set.
Changes since v5.17-rc7-rt12:
- Instead of spawning ksoftirqd early, adjust the RCU-tasks timeout
after discussion with upstream.
Known issues
- Valentin Schneider reported a few splats on ARM64, see
https://lkml.kernel.org/r/20210810134127.1394269-1-valentin.schneider@arm.com
The delta patch against v5.17-rc7-rt12 is appended below and can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.17/incr/patch-5.17-rc7-rt12-rt13.patch.xz
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.17-rc7-rt13
The RT patch against v5.17-rc7 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.17/older/patch-5.17-rc7-rt13.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.17/older/patches-5.17-rc7-rt13.tar.xz
Sebastian
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
7 files changed, 55 insertions, 63 deletions
diff --git a/patches/Add_localversion_for_-RT_release.patch b/patches/Add_localversion_for_-RT_release.patch index 7bc90935ffb7..7b0058411028 100644 --- a/patches/Add_localversion_for_-RT_release.patch +++ b/patches/Add_localversion_for_-RT_release.patch @@ -15,4 +15,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt12 ++-rt13 diff --git a/patches/rcu-tasks-Use-schedule_hrtimeout_range-while-waiting.patch b/patches/rcu-tasks-Use-schedule_hrtimeout_range-while-waiting.patch new file mode 100644 index 000000000000..df6bff82cc36 --- /dev/null +++ b/patches/rcu-tasks-Use-schedule_hrtimeout_range-while-waiting.patch @@ -0,0 +1,42 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Mon, 7 Mar 2022 17:08:23 +0100 +Subject: [PATCH] rcu-tasks: Use schedule_hrtimeout_range() while waiting for + the gp. + +The RCU selftest is using schedule_timeout_idle() which fails on +PREEMPT_RT because it is used early in boot-up phase an which point +ksoftirqd is not yet ready and is required for the timer to expire. + +To avoid this lockup, use schedule_hrtimeout() and let the timer expire +in hardirq context. This is ensures that the timer fires even on +PREEMPT_RT without any further requirement. + +The timer is set to expire between fract and fract + HZ / 2 jiffies in +order to minimize the amount of extra wake ups and to allign with +possible other timer which expire within this window. + +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + kernel/rcu/tasks.h | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/kernel/rcu/tasks.h ++++ b/kernel/rcu/tasks.h +@@ -630,12 +630,15 @@ static void rcu_tasks_wait_gp(struct rcu + while (!list_empty(&holdouts)) { + bool firstreport; + bool needreport; ++ ktime_t exp; + int rtst; + + /* Slowly back off waiting for holdouts */ + set_tasks_gp_state(rtp, RTGS_WAIT_SCAN_HOLDOUTS); +- schedule_timeout_idle(fract); +- ++ exp = jiffies_to_nsecs(fract); ++ __set_current_state(TASK_IDLE); ++ schedule_hrtimeout_range(&exp, jiffies_to_nsecs(HZ / 2), ++ HRTIMER_MODE_REL_HARD); + if (fract < HZ) + fract++; + diff --git a/patches/series b/patches/series index 3d4df3c087ae..0220b2fadf6b 100644 --- a/patches/series +++ b/patches/series @@ -34,8 +34,10 @@ irq_poll-Use-raise_softirq_irqoff-in-cpu_dead-notifi.patch smp_wake_ksoftirqd_on_preempt_rt_instead_do_softirq.patch signal_x86__Delay_calling_signals_in_atomic.patch -# net-next -tcp-Don-t-acquire-inet_listen_hashbucket-lock-with-d.patch +# misc +drm-i915-Depend-on-PREEMPT_RT.patch +cgroup__use_irqsave_in_cgroup_rstat_flush_locked.patch +mm__workingset__replace_IRQ-off_check_with_a_lockdep_assert..patch # Random, backports from git.kernel.org/pub/scm/linux/kernel/git/crng/random.git # stashed for 5.18 @@ -50,6 +52,7 @@ tcp-Don-t-acquire-inet_listen_hashbucket-lock-with-d.patch random-Move-crng_fast_load-to-the-worker.patch # sched/fork, expecting in 5.18 +tcp-Don-t-acquire-inet_listen_hashbucket-lock-with-d.patch 0001-kernel-fork-Redo-ifdefs-around-task-s-handling.patch 0002-kernel-fork-Duplicate-task_struct-before-stack-alloc.patch 0003-kernel-fork-IA64-Provide-a-alloc_thread_stack_node-f.patch @@ -88,17 +91,14 @@ mm-memcg-Only-perform-the-debug-checks-on-PREEMPT_RT.patch ########################################################################### # Posted ########################################################################### -drm-i915-Depend-on-PREEMPT_RT.patch -cgroup__use_irqsave_in_cgroup_rstat_flush_locked.patch -mm__workingset__replace_IRQ-off_check_with_a_lockdep_assert..patch x86-kvm-Require-const-tsc-for-RT.patch ptrace-fix-ptrace-vs-tasklist_lock-race-on-PREEMPT_R.patch rcu-tasks-Use-rcuwait-for-the-rcu_tasks_kthread.patch +rcu-tasks-Use-schedule_hrtimeout_range-while-waiting.patch ########################################################################### # Post ########################################################################### -softirq-Spawn-ksoftirqd-before-the-RCU-tests.patch ########################################################################### # sched: diff --git a/patches/signal__Revert_ptrace_preempt_magic.patch b/patches/signal__Revert_ptrace_preempt_magic.patch index 75ba96af04b9..38b67d2b8d67 100644 --- a/patches/signal__Revert_ptrace_preempt_magic.patch +++ b/patches/signal__Revert_ptrace_preempt_magic.patch @@ -17,7 +17,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- --- a/kernel/signal.c +++ b/kernel/signal.c -@@ -2304,16 +2304,8 @@ static void ptrace_stop(int exit_code, i +@@ -2316,16 +2316,8 @@ static void ptrace_stop(int exit_code, i if (gstop_done && ptrace_reparented(current)) do_notify_parent_cldstop(current, false, why); diff --git a/patches/softirq-Spawn-ksoftirqd-before-the-RCU-tests.patch b/patches/softirq-Spawn-ksoftirqd-before-the-RCU-tests.patch deleted file mode 100644 index d9ed4e1ba18f..000000000000 --- a/patches/softirq-Spawn-ksoftirqd-before-the-RCU-tests.patch +++ /dev/null @@ -1,50 +0,0 @@ -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri, 4 Mar 2022 11:41:30 +0100 -Subject: [PATCH] softirq: Spawn ksoftirqd before the RCU tests. - -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - include/linux/interrupt.h | 1 + - init/main.c | 1 + - kernel/softirq.c | 5 +---- - 3 files changed, 3 insertions(+), 4 deletions(-) - ---- a/include/linux/interrupt.h -+++ b/include/linux/interrupt.h -@@ -600,6 +600,7 @@ asmlinkage void __do_softirq(void); - - extern void open_softirq(int nr, void (*action)(struct softirq_action *)); - extern void softirq_init(void); -+extern void softirq_spawn_ksoftirqd(void); - extern void __raise_softirq_irqoff(unsigned int nr); - - extern void raise_softirq_irqoff(unsigned int nr); ---- a/init/main.c -+++ b/init/main.c -@@ -1598,6 +1598,7 @@ static noinline void __init kernel_init_ - - init_mm_internals(); - -+ softirq_spawn_ksoftirqd(); - rcu_init_tasks_generic(); - do_pre_smp_initcalls(); - lockup_detector_init(); ---- a/kernel/softirq.c -+++ b/kernel/softirq.c -@@ -963,15 +963,12 @@ static struct smp_hotplug_thread softirq - .thread_comm = "ksoftirqd/%u", - }; - --static __init int spawn_ksoftirqd(void) -+__init void softirq_spawn_ksoftirqd(void) - { - cpuhp_setup_state_nocalls(CPUHP_SOFTIRQ_DEAD, "softirq:dead", NULL, - takeover_tasklets); - BUG_ON(smpboot_register_percpu_thread(&softirq_threads)); -- -- return 0; - } --early_initcall(spawn_ksoftirqd); - - /* - * [ These __weak aliases are kept in a separate compilation unit, so that diff --git a/patches/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch b/patches/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch index fa2bd5b08b37..9a8405ae4dea 100644 --- a/patches/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch +++ b/patches/softirq-Use-a-dedicated-thread-for-timer-wakeups.patch @@ -45,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h -@@ -606,6 +606,22 @@ extern void __raise_softirq_irqoff(unsig +@@ -605,6 +605,22 @@ extern void __raise_softirq_irqoff(unsig extern void raise_softirq_irqoff(unsigned int nr); extern void raise_softirq(unsigned int nr); @@ -162,16 +162,16 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + .thread_comm = "ktimers/%u", +}; + - __init void softirq_spawn_ksoftirqd(void) + static __init int spawn_ksoftirqd(void) { cpuhp_setup_state_nocalls(CPUHP_SOFTIRQ_DEAD, "softirq:dead", NULL, takeover_tasklets); BUG_ON(smpboot_register_percpu_thread(&softirq_threads)); + if (IS_ENABLED(CONFIG_PREEMPT_RT)) + BUG_ON(smpboot_register_percpu_thread(&timer_threads)); - } - /* + return 0; + } --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1805,7 +1805,7 @@ void hrtimer_interrupt(struct clock_even diff --git a/patches/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch b/patches/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch index 77891603dc3c..89ba39cc46b1 100644 --- a/patches/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch +++ b/patches/x86_entry__Use_should_resched_in_idtentry_exit_cond_resched.patch @@ -21,7 +21,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- --- a/kernel/entry/common.c +++ b/kernel/entry/common.c -@@ -395,7 +395,7 @@ void irqentry_exit_cond_resched(void) +@@ -401,7 +401,7 @@ void irqentry_exit_cond_resched(void) rcu_irq_exit_check_preempt(); if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) WARN_ON_ONCE(!on_thread_stack()); |