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

Alan Cox (
Wed, 9 Apr 1997 23:36:52 +0100 (BST)

> It's my suspicion that if accept() woke up the last process to block on
> it then there'd be a performance improvement for servers like Apache.


> recent apache. Learn why src/conf.h defines USE_FCNTL_SERIALIZED_ACCEPT
> for LINUX and figure out if you can remove that define (you may need

No idea. I've never got to the bottom of this. I've been running with that
stupid define off since 1.2 with no problems.

> running stable then benchmark it. Now hack your linux kernel to wake
> tasks in LIFO order out of accept() and benchmark again.

Linux has no "wake_one" semantic in the scheduling. This is going to become
an issue for 2.1 when we have the fine grained SMP sane as without it we
get the so called "thundering herd" problems.