Re: something to experiment with: LIFO and accept()

Dean Gaudet (dgaudet@arctic.org)
Mon, 7 Apr 1997 00:29:14 -0700 (PDT)


On Mon, 7 Apr 1997, David S. Miller wrote:
> 2) There could be the possibility of starvation under some
> corener cases, this needs to be investigated.

Marc Slemko (another apache developer) wants to do this with FreeBSD
and he's going to add a socket option for it. That should deal with
both of your issues.

BTW I looked at the linux kernel code and it does look like it's safe to
remove the #define USE_FCNTL_SERIALIZED_ACCEPT from the LINUX section
of apache's src/conf.h. This was previously added probably because
of situations where linux would get confused with multiple processes
blocked in accept() on the same socket.

But the kernel looks a little inefficient -- all processes blocked on
accept() are awakened when a new socket is ESTABLISHED. It looks a bit
difficult to awaken only one... unless an accept wait_queue is created.

Dean