From: Eric Dumazet <[EMAIL PROTECTED]> Date: Thu, 15 Nov 2007 09:25:59 +0100
> Please note that : > > if (need_resched()) > cond_resched(); > > will re-test need_resched() once cond_resched() is called. > > So it may sound unnecessary but in the rt_check_expire() case, with a loop > potentially doing XXX.XXX iterations, being able to bypass the function call > is a clear win (in my bench case, 25 ms instead of 88 ms). Impact on I-cache > is irrelevant here as this rt_check_expires() runs once every 60 sec. BTW, Eric, initially I was going to recommend that you do something like: if ((goal % SOME_POWER_OF_2) == 0) cond_resched(); to mitigate this cost but decided it wasn't worth the bother. - 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