Messages in this thread | | | Subject | Re: cond_resched() and RCU CPU stall warnings | From | Mike Galbraith <> | Date | Sun, 16 Mar 2014 08:30:20 +0100 |
| |
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
| |