Re: [NET]: rt_check_expire() can take a long time, add a cond_resched()
From: Herbert Xu
Date: Sat Nov 17 2007 - 10:23:11 EST
Andi Kleen <andi@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx>
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/