From: Herbert Xu <[EMAIL PROTECTED]> Date: Sun, 18 Nov 2007 10:07:37 +0800
> On Sat, Nov 17, 2007 at 04:45:42PM -0800, David Miller wrote: > > > > Herbert, you asked about just nop'ing out cond_resched() when we're > > doing real preemption. > > > > A lot of code goes: > > > > if (need_resched()) { > > /* drop some locks, etc. */ > > cond_resched(); > > /* reacquire locks, etc. */ > > } > > > > So it has to do something even with real preemption enabled. > > Actually that shouldn't be necessary. Because things like spin_unlock > does preempt_enable which in turn does: > > #define preempt_enable() \ > do { \ > preempt_enable_no_resched(); \ > barrier(); \ > preempt_check_resched(); \ > } while (0) > > when CONFIG_PREEMPT is enabled. So at least in this case the > cond_resched call is superfluous. I see what you mean, ok yes that would catch it. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html