]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Add a "queue_info" structure to the worker MPM. This is used to prevent
authorAaron Bannert <aaron@apache.org>
Sun, 28 Apr 2002 01:45:00 +0000 (01:45 +0000)
committerAaron Bannert <aaron@apache.org>
Sun, 28 Apr 2002 01:45:00 +0000 (01:45 +0000)
commit74e6213202a9d9c24055a4e99609c42a92992e1d
tree3a4c40a1facf560210de5e6bd8839f2c0ac57014
parent01d7af035ff43a23f036cd10df10958ce131334f
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94824 13f79535-47bb-0310-9956-ffa450edef68
server/mpm/worker/fdqueue.c
server/mpm/worker/fdqueue.h
server/mpm/worker/worker.c