7d37dff338a52aa8836d78e4f1a67b76911da66c 94824 |
|
28-Apr-2002 |
aaron |
Add a "queue_info" structure to the worker MPM. This is used to prevent
the listener thread from accept()ing more connections than there are
available workers. This prevents long-running requests from starving
connections that have been accepted but not yet processed.
The queue_info is a simple counter, mutex, and condition variable. Only
the listener thread blocks on the condition, and only when there are no
idle workers. In the fast path there is a mutex lock, integer decrement,
and and unlock (among a few conditionals). The worker threads each notify
the queue_info when they are about to block on the normal worker_queue
waiting for some connection to process, which wakes up any sleeping
listener thread to go perform another accept() in parallel. |
e7c42c26f9d1f8bfdc703028801bb3daff2f982a 94813 |
|
26-Apr-2002 |
aaron |
Convert the worker MPM's fdqueue from a LIFO back into a FIFO. Since
elements in the queue represent accept()ed connections, we want them
to be processed in the order that they were received. (I erroneously
converted it to a LIFO quite awhile ago in the hopes that it would
improve cache efficiency.)
Remember to perform a make clean in the worker directory after this patch,
since this patch changes the size of the fd_queue_t object (which is
allocated in worker.c). |
62775acdbd932f60b1fc4ceb306c4dfeabdb92a4 91223 |
|
01-Oct-2001 |
rbb |
clean up the fdqueue a bit more, by implementing Greg's
suggestions to getting rid of redundant variables, as well as
converting the simple ap_queue_full/ap_queue_empty tests into macros.
This also reinstates the "not_full" condition, which turned out to
be useful afterall in cases where we wanted to prevent the listener
thread from accepting further connections until the worker queue has
room for more.
Submitted by: [Aaron Bannert <aaron@clove.org>] |