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. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - 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