summaryrefslogtreecommitdiff
path: root/server/mpm/experimental/threadpool/threadpool.c
Commit message (Collapse)AuthorAgeFilesLines
* remove leader, perchild, and threadpool MPMs (other than non-English bits in ↵Jeff Trawick2009-03-261-2250/+0
| | | | | | common parts of the manual) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758613 13f79535-47bb-0310-9956-ffa450edef68
* API Cleanup in preperation for 2.4.x, make sure all exported functions or ↵Paul Querna2008-12-021-4/+4
| | | | | | variables contain an ap_ prefix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@722399 13f79535-47bb-0310-9956-ffa450edef68
* Remove all references to CORE_PRIVATE.Paul Querna2008-04-071-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
* Replace ap_get_server_version with ap_get_server_banner() andJeff Trawick2006-09-051-1/+1
| | | | | | | | | | | | | | | | | ap_get_server_description(). High-level summary: The full server version information is now included in the error log at startup as well as server status reports, irrespective of the setting of the ServerTokens directive. Third-party modules must now use ap_get_server_banner() or ap_get_server_description() in place of ap_get_server_version(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@440337 13f79535-47bb-0310-9956-ffa450edef68
* update license header textRoy T. Fielding2006-07-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
* Update the copyright year in all .c, .h and .xml filesColm MacCarthaigh2006-04-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
* No functional Change: Removing trailing whitespace. This alsoJim Jagielski2005-11-101-122/+122
| | | | | | | | means that "blank" lines consisting of just spaces or tabs are now really blank lines git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
* No functional change: simple detabbing of indented code.Jim Jagielski2005-11-101-8/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
* Initiliase all of the first_*_limit variables to zero, so that we can actuallyColm MacCarthaigh2005-08-311-2/+2
| | | | | | | | raise limits beyond their defaults reliably. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@265523 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-041-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
* use existing directive name ThreadStackSize instead ofJeff Trawick2004-03-151-2/+2
| | | | | | | | | WorkerStackSize as made obvious by: Brad Nicholes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102975 13f79535-47bb-0310-9956-ffa450edef68
* Threaded MPMs for Unix and Win32: Add WorkerStackSize directiveJeff Trawick2004-03-111-0/+3
| | | | | | | | | | | | | to override default thread stack size for threads which handle client connections. Required for some third-party modules on platforms with small default thread stack size. This is also useful for trimming back the stack size on platforms with relatively large default stack size in order to conserve address space for supporting more threads per child. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102931 13f79535-47bb-0310-9956-ffa450edef68
* fix name of The Apache Software FoundationAndré Malo2004-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
* fix copyright dates according to the first check inAndré Malo2004-02-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102582 13f79535-47bb-0310-9956-ffa450edef68
* apply Apache License, Version 2.0André Malo2004-02-061-53/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
* Unix MPMs: Stop dropping connections when the file descriptorJeff Trawick2004-01-271-10/+0
| | | | | | | | | | | is at least FD_SETSIZE. That isn't a problem for most users (since poll() is widespread). On old boxes where select() must be used by APR, APR needs to fail operations that don't work with such fds. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102419 13f79535-47bb-0310-9956-ffa450edef68
* update license to 2004.André Malo2004-01-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
* update leader, threadpool, and worker MPMs to return MPM stateJeff Trawick2003-12-131-2/+24
| | | | | | | from ap_mpm_query() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102045 13f79535-47bb-0310-9956-ffa450edef68
* update threadpool MPM to build and appear to work with the current APRJeff Trawick2003-12-131-26/+45
| | | | | | | pollset API git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102044 13f79535-47bb-0310-9956-ffa450edef68
* remove calls to the apr_proc_other_child_read function that no longer existsBrian Pane2003-11-241-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101858 13f79535-47bb-0310-9956-ffa450edef68
* Lower the severity of the "listener thread didn't exit" messageJeff Trawick2003-09-051-1/+1
| | | | | | | | | to debug, as it is of interest only to developers. PR: 9011 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101165 13f79535-47bb-0310-9956-ffa450edef68
* Fix a misleading message from the some of the threaded MPMs whenJeff Trawick2003-09-051-1/+1
| | | | | | | MaxClients has to be lowered due to the setting of ServerLimit. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101160 13f79535-47bb-0310-9956-ffa450edef68
* Updated the various MPM's to use the new bucket_alloc_create_ex APICliff Woolley2003-08-281-4/+2
| | | | | | | | | | | when necessary. Which is to say that it's necessary in all cases except for prefork, where the change to apr-util to have it use the allocator from the pool passed in is already sufficient. Reviewed by: Jean-Jacques Clar, Sander Striker, Brad Nicholes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101122 13f79535-47bb-0310-9956-ffa450edef68
* Make sure that the global ap_max_mem_free is initialized along with theBradley Nicholes2003-08-271-0/+3
| | | | | | | other MPM globals whenever HTTPD is started or restarted. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101117 13f79535-47bb-0310-9956-ffa450edef68
* consolidate code related to sig_coredumpJeff Trawick2003-04-091-72/+7
| | | | | | | | | | | a note on perchild: perchild exception handling was busted before this and is still busted the problem I noticed was that a client that exposes a segfault never gets its connection dropped and the parent never notices that the child process that segfaulted hasexited git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99312 13f79535-47bb-0310-9956-ffa450edef68
* finished that boring job:André Malo2003-02-031-1/+1
| | | | | | | | | update license to 2003. Happy New Year! ;-)) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
* http occurances to update for apr_socket_opt_get/setWilliam A. Rowe Jr2002-07-151-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96057 13f79535-47bb-0310-9956-ffa450edef68
* Bring Apache in line with APR's new poll implementation. This isn'tRyan Bloom2002-07-111-1/+2
| | | | | | | | | optimal, because it still uses the compatibility functions to make it work, but it does work. The next step will be to take the memory for the pollsets under Apache's control. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96005 13f79535-47bb-0310-9956-ffa450edef68
* Add a new directive: MaxMemFree. MaxMemFree makes it possibleSander Striker2002-07-041-0/+1
| | | | | | | | | | | to configure the maximum amount of memory the allocators will hold on to for reuse. Anything over the MaxMemFree threshold will be free()d. This directive is usefull when uncommon large peaks occur in memory usage. It should _not_ be used to mask defective modules' memory use. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95954 13f79535-47bb-0310-9956-ffa450edef68
* Now that we have the functionality in apr, we can now have 2.0'sJim Jagielski2002-06-071-1/+3
| | | | | | | | | | | | startup message regarding AcceptMutex (what we are using and what the default is) "fully" match what is present in 1.3. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95568 13f79535-47bb-0310-9956-ffa450edef68
* Support -k argument in threadpoolBrian Pane2002-06-061-1/+1
| | | | | | | | Submitted by: Thom May <thom@planetarytramp.net> Reviewed by: Brian Pane git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95554 13f79535-47bb-0310-9956-ffa450edef68
* Catch up with the apr_allocator_set_owner -> apr_allocator_owner_set renamesSander Striker2002-05-301-1/+1
| | | | | | | in APR. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95373 13f79535-47bb-0310-9956-ffa450edef68
* stop using APLOG_NOERRNO in calls to ap_log_?error()Jeff Trawick2002-05-171-40/+40
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
* Rename the worker_stack_interrupt_all() function as worker_stack_terminate().Aaron Bannert2002-04-281-3/+8
| | | | | | | Also, broadcast a signal after we set the terminate flag on the worker stack. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94846 13f79535-47bb-0310-9956-ffa450edef68
* Remove unused variable.Aaron Bannert2002-04-281-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94844 13f79535-47bb-0310-9956-ffa450edef68
* Some more threadpool MPM changes:Aaron Bannert2002-04-281-7/+30
| | | | | | | | | | | | | | - Add a "state" variable to the worker_wakeup_info struct. This is used to make sure that we act on the correct signal, and to know when to shut down a worker thread. - Fix the call when the worker thread waits for a connection to use the new state variable and use mutexes around the cond_wait() call. - Change the interrupt_all() call to set the WORKER_TERMINATED state. - Add two AP_DEBUG_ASSERT() to make sure that we aren't waking up a worker thread before it is idle. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94843 13f79535-47bb-0310-9956-ffa450edef68
* Clarify an incorrect statement about why we're purposfully puttingAaron Bannert2002-04-281-4/+10
| | | | | | | the signal inside of a mutex. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94842 13f79535-47bb-0310-9956-ffa450edef68
* Some threadpool fixes:Aaron Bannert2002-04-281-27/+41
| | | | | | | | | | | | | - We don't need the listener_blocked flag, just check if the element we're adding makes the stack non-empty. - When we are terminated, return APR_EOF; catch this event in the worker thread and the listener thread. - When shutting down, always signal a potential listener thread. - Wait to signal the listener thread until after we add the worker element to the stack. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94841 13f79535-47bb-0310-9956-ffa450edef68
* When we signal a condition variable, we need to own the lock thatAaron Bannert2002-04-281-3/+10
| | | | | | | | is associated with that condition variable. This isn't necessary for Solaris, but for Posix it is. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94839 13f79535-47bb-0310-9956-ffa450edef68
* Another experimental MPM derived from worker:Brian Pane2002-04-161-0/+2265
The threadpool MPM implements Aaron Bannert's "time-space tradeoff" design managing idle workers. Rather than putting accepted connections into a queue, the threadpool MPM keeps idle worker threads in a stack. Its dedicated listener thread retrieves an idle worker from the stack before accepting a connection. If there are no idle workers, the listener blocks until a worker becomes available before doing an accept. In many ways, threadpool is also a variant of leader/follower. They both maintain a stack of idle threads. The difference is that threadpool has a dedicated listener thread, and leader/follower rotates the listening responsibility among its worker threads. In my initial testing, the leader/follower MPM performs very well on multiprocessor Solaris 8 when listening on a single port, but poorly when listening on multiple ports. (I don't know why this is happening. What I've found so far is that when you add a poll on the listen socket(s) before the accept in the leader/follower MPM, all the socket-related syscalls in the httpd get slower. My hypothesis is that the thread scheduler is making an optimal decision about where (on what CPU) to run the newly awakened thread if its first syscall is an accept, and a nonoptimal decision if its first syscall is a poll.) The threadpool MPM performs better with multiple listener ports, and in my testing so far it looks competitive with leader/follower when running with a single listener. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94672 13f79535-47bb-0310-9956-ffa450edef68