Re: [PATCH] tracing: Have the trace_event benchmark thread call cond_resched_rcu_qs()
From: Paul E. McKenney
Date: Tue Apr 11 2017 - 19:47:33 EST
On Tue, Apr 11, 2017 at 06:56:01PM -0400, Steven Rostedt wrote:
> On Tue, 11 Apr 2017 18:54:35 -0400
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx>
> >
> > The trace_event benchmark thread runs in kernel space in an infinite loop
> > while also calling cond_resched() in case anything else wants to schedule
> > in. Unfortunately, on a PREEMPT kernel, that makes it a nop, in which case,
> > this will never voluntarily schedule. That will cause synchronize_rcu_tasks()
> > to forever block on this thread, while it is running.
> >
> > This is exactly what cond_resched_rcu_qs() is for. Use that instead.
> >
> > Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
>
> This actually should be:
>
> Recommended-by: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
And:
Acked-by: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
> -- Steve
>
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
> > ---
>