Messages in this thread | | | From | Herbert Xu <> | Subject | Re: [NET]: rt_check_expire() can take a long time, add a cond_resched() | Date | Sat, 17 Nov 2007 23:21:39 +0800 |
| |
Andi Kleen <andi@firstfloor.org> wrote: > >>> > With the extra check (and *much* less function calls), each run >>> > takes 25ms > > ms?!? The numbers sound wrong. Wrong unit?
That's quite possible with a huge routing cache. I think that's the reason Eric is doing this in the first place.
>> however... this is likely a good argument for making cond_resched() as a >> whole a #define (or inline) that does this test and then calls the out >> of line code (which then doesn't need to retest, so it avoids the >> double test)... > > Disadvantage would be that might_sleep would be commonly skipped then > (unless you actually need to reschedule) > But perhaps that's not a big issue.
On a related note, would it be possible for cond_resched() to be compiled out completely if we're doing real preemption as opposed to voluntary preemption?
Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au> 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 linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |