On Mon, Sep 20, 2004 at 12:14:46AM +0200, Pablo Neira wrote:
>
> When the buffer is full, I wake up the user process and put the kernel
> thread to sleep to let the user process empty the queue.
Well that sounds like a good idea but it isn't:
1) You wake up no-one or the wrong process half of the time.
2) Every time a packet is added to the queue the destination process is
woken up. So by the time it's full it has been woken up many times
already. If all those wake_up's didn't make a difference, then this
extra one here isn't likely to either.
3) All kernel callers of this function have timeout set to zero. Therefore
they won't even encounter your code.
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
|