lkml.org 
[lkml]   [2019]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] rcu/tree: Fix SCHED_FIFO params
On Thu, Aug 01, 2019 at 01:13:50PM +0200, Peter Zijlstra wrote:
> A rather embarrasing mistake had us call sched_setscheduler() before
> initializing the parameters passed to it.
>
> Cc: Juri Lelli <juri.lelli@redhat.com>
> Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>

Thank you for having CCed me this time. ;-)

Reviewed-by: Paul E. McKenney <paulmck@linux.ibm.com>

> Fixes: 1a763fd7c633 ("rcu/tree: Call setschedule() gp ktread to SCHED_FIFO outside of atomic region")
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> kernel/rcu/tree.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -3234,13 +3234,13 @@ static int __init rcu_spawn_gp_kthread(v
> t = kthread_create(rcu_gp_kthread, NULL, "%s", rcu_state.name);
> if (WARN_ONCE(IS_ERR(t), "%s: Could not start grace-period kthread, OOM is now expected behavior\n", __func__))
> return 0;
> - if (kthread_prio)
> + if (kthread_prio) {
> + sp.sched_priority = kthread_prio;
> sched_setscheduler_nocheck(t, SCHED_FIFO, &sp);
> + }
> rnp = rcu_get_root();
> raw_spin_lock_irqsave_rcu_node(rnp, flags);
> rcu_state.gp_kthread = t;
> - if (kthread_prio)
> - sp.sched_priority = kthread_prio;
> raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
> wake_up_process(t);
> rcu_spawn_nocb_kthreads();
>
>

\
 
 \ /
  Last update: 2019-08-01 15:51    [W:0.152 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site