Skip to content

Commit 130d9c3

Browse files
author
Peter Zijlstra
committed
rcu/tree: Fix SCHED_FIFO params
A rather embarrasing mistake had us call sched_setscheduler() before initializing the parameters passed to it. Fixes: 1a763fd ("rcu/tree: Call setschedule() gp ktread to SCHED_FIFO outside of atomic region") Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Paul E. McKenney <paulmck@linux.ibm.com> Cc: Juri Lelli <juri.lelli@redhat.com>
1 parent a1dc044 commit 130d9c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎kernel/rcu/tree.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3234,13 +3234,13 @@ static int __init rcu_spawn_gp_kthread(void)
32343234
t = kthread_create(rcu_gp_kthread, NULL, "%s", rcu_state.name);
32353235
if (WARN_ONCE(IS_ERR(t), "%s: Could not start grace-period kthread, OOM is now expected behavior\n", __func__))
32363236
return 0;
3237-
if (kthread_prio)
3237+
if (kthread_prio) {
3238+
sp.sched_priority = kthread_prio;
32383239
sched_setscheduler_nocheck(t, SCHED_FIFO, &sp);
3240+
}
32393241
rnp = rcu_get_root();
32403242
raw_spin_lock_irqsave_rcu_node(rnp, flags);
32413243
rcu_state.gp_kthread = t;
3242-
if (kthread_prio)
3243-
sp.sched_priority = kthread_prio;
32443244
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
32453245
wake_up_process(t);
32463246
rcu_spawn_nocb_kthreads();

0 commit comments

Comments
 (0)