[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/kern
On Sun, Dec 13, 2009 at 08:02:24PM +0000, David Laight wrote:
> Log Message:
> Another, better, fix for PR/26567.
> Only sleep once within each pipe_read/pipe_write call.
> If there is no data/space available after we wakeup return ERESTART so
> then the 'fd' number is validated again.
> A simple broadcast of the cvs is then enough to evict the correct threads
> when close() is called from an active thread.
Isn't this going to cause a thundering herd problem if there are a lot
of readers competing for the input? The first one will wake up and
consume the available data, and then the rest will take a trip all the
way to userspace and back.
This may or may not be a practical problem for pipes but I'd expect
the same approach to suck pretty hard for e.g. accept() on sockets. :(
David A. Holland
Main Index |
Thread Index |