lkml.org 
[lkml]   [2016]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: perf: fuzzer BUG: KASAN: stack-out-of-bounds in __unwind_start
On Wed, Nov 30, 2016 at 01:13:03PM -0600, Josh Poimboeuf wrote:
> This question was probably intended for other folks, but I should point
> out that idle tasks *do* invoke the scheduler. cpu_idle_loop() calls
> schedule_preempt_disabled().

Right, but that doesn't matter I think. The below will simply not call
rcu_note_voluntary_context_switch() from the idle task, which would be
fine I think.

> > So is the following a sensible approach, or should I look elsewhere?
> >
> > #define cond_resched_rcu_qs() \
> > do { \
> > if (!is_idle_task(current) && !cond_resched()) \
> > rcu_note_voluntary_context_switch(current); \

You should reverse your conditions though:

if (!cond_resched() && !is_idle_task(current))
rcu_note_voluntary_context_switch(current);

That way we'll still do cond_resched() and you only gate the RCU call.

\
 
 \ /
  Last update: 2016-12-01 06:53    [W:0.157 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site