lkml.org 
[lkml]   [2014]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cond_resched() and RCU CPU stall warnings
From
Date
On Sat, 2014-03-15 at 23:25 -0700, Paul E. McKenney wrote: 
> On Sun, Mar 16, 2014 at 07:09:42AM +0100, Mike Galbraith wrote:

> > Hm. Since you only care about the case where your task is solo, how
> > about do racy checks, 100% accuracy isn't required is it? Seems you
> > wouldn't want to unconditionally do that in tight loops.
>
> And indeed, my current workaround unconditionally does schedule() one
> out of 256 loops. I would do something similar here, perhaps based
> on per-CPU counters, perhaps even with racy accesses to avoid always
> doing preempt_disable()/preempt_enable().
>
> Or did you have something else in mind?

Exactly what I meant, take a racy peek or two first.

-Mike



\
 
 \ /
  Last update: 2014-03-16 08:41    [W:0.047 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site