lkml.org 
[lkml]   [2009]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: Move the sleeping while atomic checks early in cond_resched()
On Fri, Jul 10, 2009 at 08:13:42PM +0200, Peter Zijlstra wrote:
> On Fri, 2009-07-10 at 20:08 +0200, Frederic Weisbecker wrote:
>
> > > Right, how about renaming these to _cond_resched_{lock,softirq}, and
> > > added a __might_sleep() definition for !DEBUG_SPINLOCK_SLEEP and add
> > > macro wrappers to sched.c for these two as well?
> >
> > I did that first but thought that might_sleep() would fail in a spinlock
> > held or softirq context, right?
>
> Ah, right.. maybe we can add a preempt_count_offset parameter to
> __might_sleep() such that it will compensate for the pending
> spin_unlock()/local_bh_enable().


Good idea, I'm trying that.



\
 
 \ /
  Last update: 2009-07-10 20:33    [W:0.033 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site