e721236e598d985001c6cabe8c960b648cde7c19 1643282 |
|
05-Dec-2014 |
ylavic |
mpm_worker: replace apr_atomic_cas32(+1) loop with the more efficient
apr_atomic_inc32().
Also declare fd_queue_info_t's idlers member as volatile since it is
used outside atomic functions (or it could be optimized out by the
compiler). |
8639a789ef8a4adec121d5b26b4d66c5cf8989cc 1064269 |
|
27-Jan-2011 |
jim |
Revert an old (~10yr) change to the fd Q; move back to
FIFO rather than LIFO, for more consistent performance
so that older requests don't suffer |
49f77954252489cd8f9037e1e2d79d16a7d6897f 726113 |
|
12-Dec-2008 |
chrisd |
I'm not 100% sure about this, but it seems to silence the
compiler warnings generated by r101236 (which was, in turn,
intended to do the same). |
b44a707ac289d826620a65769db8074c96cb6a7e 702867 |
|
08-Oct-2008 |
rpluem |
* Recheck again if idle workers are still available when we are signaled that
they are. This is needed since it can happen that we are signaled by a
worker thread that went idle but received a context switch before it could
tell us. If it does signal us later once it is on CPU again there might be
no idle worker left. See
https://issues.apache.org/bugzilla/show_bug.cgi?id=45605#c4
PR: 45605
Submitted by: Denis Ustimenko <denusk gmail.com>
Reviewed by: rpluem |
c96beebb3d04691bf199a3b311d281a31f34c767 633612 |
|
04-Mar-2008 |
chrisd |
add comment from event MPM's fdqueue ap_pop_pool() regarding
ABA problem and avoidance because only caller is single listener thread |
ad4e6b6e2fababcc12d48071492c9b2d76e022cb 630350 |
|
23-Feb-2008 |
rpluem |
* Add hint to PR in comment. No functional change. |
51ef69890746f3cb512c7b867d43425af928a816 630348 |
|
22-Feb-2008 |
rpluem |
* Second part of fix for PR 44402:
- Fix the same race condition in event MPM.
- Slightly optimize code in worker MPM by removing the need for an additional
dereference operation.
- Do some word smithing on the CHANGES entry.
PR: 44402
Submitted by: Basant Kumar Kukreja <basant.kukreja sun.com>
Reviewed by: rpluem |
2abb2c210f1ddd7312ee86dd1d9e8486f4fff29c 630335 |
|
22-Feb-2008 |
niq |
Worker MPM: fix race condition
PR44402: reported and fixed by Basant Kumar Kukreja |
0696197a54f186a65abacba1037f6fbe0cb975a1 557837 |
|
20-Jul-2007 |
niq |
Multiple trivial fixes from Christophe JAILLET
PR 38699, 39518, 42005, 42006, 42007, 42008, 42009
The patches are all his, and are sufficiently trivial to review
at a glance. |
842ae4bd224140319ae7feec1872b93dfd491143 420983 |
|
11-Jul-2006 |
fielding |
update license header text |
3d81f57512275ca06a60a9bcbd23c1f8b429fdf2 395228 |
|
19-Apr-2006 |
colm |
Update the copyright year in all .c, .h and .xml files |
e8f95a682820a599fe41b22977010636be5c2717 332306 |
|
10-Nov-2005 |
jim |
No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines |
08cb74ca432a8c24e39f17dedce527e6a47b8001 151408 |
|
04-Feb-2005 |
jerenkrantz |
Update copyright year to 2005 and standardize on current copyright owner line. |
161ee4901129514870d94dd79991025e44e96485 111385 |
|
09-Dec-2004 |
gregames |
ap_queue_push: update comment to reflect reality
pointed out by: Ron Park (ronp cnet.com) |
6de8046f8f7e07cd83895a528df25d977e502c76 102619 |
|
09-Feb-2004 |
nd |
fix name of The Apache Software Foundation |
e0c628632cac659dacda1db6d72c99c3c6eb66a1 102587 |
|
08-Feb-2004 |
nd |
fix copyright dates according to the first checkin |
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dc 102525 |
|
06-Feb-2004 |
nd |
apply Apache License, Version 2.0 |
26a4456dd6f1a5d7d7fff766551461a578687c4a 102135 |
|
01-Jan-2004 |
nd |
update license to 2004. |
377225a335b5bb47e12c2739cb902f53fd869a09 101340 |
|
29-Sep-2003 |
brianp |
Switch to the new 32-bit APR atomic API for better portability
(the old code assumed that apr_atomic_t and apr_uint32_t were interchangeable).
Also, add more detailed comments on how one of the synchronization
functions works. |
60539b341dfc6fe63e67d42df3ff349229b61b58 101236 |
|
13-Sep-2003 |
brianp |
Add casts to apr_atomic_casptr arguments to avoid compiler warnings |
c0092a7239c36c9051ab90597e7f5a07b7ef0e58 100542 |
|
10-Jul-2003 |
jorton |
Minor cleanups:
* fdqueue.c (ap_queue_info_term, ap_queue_interrupt_all):
Remove redundant conditionals. |
33bdcae1f7a1a65e351dda2a766a0cf28b1e695d 98573 |
|
03-Feb-2003 |
nd |
finished that boring job:
update license to 2003.
Happy New Year! ;-)) |
f543621fce8c54ae888089db735466cf8faa1d6e 98272 |
|
15-Jan-2003 |
trawick |
fix the type of the idlers field to match what apr_atomic_cas() expects
this fixes the compile when using the native compiler for AIX (and likely
other non-gcc compilers) |
4567cfc6a65328bd3e8dd2b758ca926b389c7058 98159 |
|
03-Jan-2003 |
brianp |
Replace most of the mutex locking in the worker MPM's "queue info"
object with atomic compare-and-swap loops. |
bed02440cc52bd5ad9c699aa8858634eebdf2afd 96294 |
|
02-Aug-2002 |
ianh |
typo |
2ca62d78a3050607739f4ef9c25b46c45f4c26af 94850 |
|
29-Apr-2002 |
brianp |
Removed some code from the mutex-protected block in ap_queue_pop().
If the worker thread synchronization is working properly, it's not
necessary to set these fields to NULL after removing an element from
the queue, and it's IMO more important to have a shorter code path
leading up to the mutex_unlock. I left in support for NULLing the
fields when debugging, though. |
7e0bb2ecc6b47f00d2c60d22bbff7be3849383e2 94845 |
|
29-Apr-2002 |
brianp |
Removed the "not_full" condition variable and associated conditional
logic from the file descriptor queue, now that we can rely on the
idle worker reference count to keep the listener from trying to
push connections into a full queue
Reviewed by: Aaron Bannert (concept) |
5d5d5ca04c57c7ab865924f4648e8f80de27adfe 94830 |
|
28-Apr-2002 |
brianp |
Moved the recycled pool list from the queue to the queue_info structure.
The advantage of doing this is that it enables us to guarantee that the
number of ptrans pools in existence at once is no greater than the
number of worker threads, and that we'll never have to delete ptrans
pools. |
28c8f68d24d3511c87f7b3bd2841caa8c5621ee1 94829 |
|
28-Apr-2002 |
brianp |
Added a missing pool deletion case and simplified the conditionals
for the error-case return (thanks to Justin for suggesting the
latter) |
31416ddb540dfa07c687b745fe60f4b4fb4d81da 94828 |
|
28-Apr-2002 |
brianp |
Move a potentially expensive pool cleanup operation outside
the mutex-protected critical path of ap_queue_pop() |
ffaf5de7264cede655067f4425ab64c88578b7ff 94827 |
|
28-Apr-2002 |
aaron |
Preserve the original error, or if the unlock fails then use that
error instead.
Obtained from: Justin Erenkrantz
Submitted by: Aaron Bannert |
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). |
6a5bdbbacf4a62adecde52b8f23ebcc4fa2a08b8 94106 |
|
21-Mar-2002 |
trawick |
Don't drop connections during graceful restart. Previously, worker
threads could exit even though there were connections waiting in the
queue.
Now, for a graceful restart the worker threads won't exit until they
are told that the queue has been drained and no more connections will
ever be added. |
d311f077fd868fef41b768dc2fbc0d31140c531f 94088 |
|
21-Mar-2002 |
trawick |
fix a comment |
bc8fd1b0b1afdf89b8d28eefa8cd74e26ba97986 93918 |
|
13-Mar-2002 |
fielding |
Update our copyright for this year. |
a322a82f79b790fb7ddcd7df4459d20725450fa7 93530 |
|
21-Feb-2002 |
trawick |
Convert the ap_queue_foo routines to return apr_status_t as appropriate. |
3264438575d967c19e5fab7f18f9487a1e4860b5 93386 |
|
13-Feb-2002 |
brianp |
Performance optimization: updated the worker MPM to recycle
per-transaction pools instead of destroying them. Based on
Ian's benchmark testing, this reduces CPU utilization by
about 1% on Solaris. |
64ff1949093e64474a00badd61a3495e35fa192d 91531 |
|
17-Oct-2001 |
aaron |
Fully convert worker's fdqueue to the new APR lock API:
- Mutexes and Condition Variables from APR are now used instead of
direct (non-portable) calls to pthread.
Still need to fully APRize these routines, particularly the return
values. In many cases a failed lock or cond var call will simply return
FD_QUEUE_FAILURE. This should obviously instead return the appropriate
APR error code. |
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>] |
abaaa634d7cee882b7c4bf078ded749ebf11997e 91077 |
|
19-Sep-2001 |
rbb |
Turn the worker MPM's queue into a LIFO. This may
improve cache-hit performance under some conditions.
Submitted by: Aaron Bannert <aaron@clove.org> |
de3abad1fe263e577bb11e99b358836bd901397c 91075 |
|
18-Sep-2001 |
rbb |
Cleanup the worker MPM. We no longer re-use transaction
pools. This incurs less overhead than shuffling the pools
around so that they can be re-used. Remove one of the
queue's condition variables. We just redefined the API to
state that you can't try to add more stuff than you allocated
segments for.
Submitted by: Aaron Bannert <aaron@clove.org> |
81dcded0d4bcfd21ea51a7bcdda7ec428ca93541 90749 |
|
28-Aug-2001 |
rbb |
Remove an obsolete function from fdqueue. The worker MPM now uses the
fdqueue functions in a different way.
Submitted by: Aaron Bannert <aaron@clove.org> |
e00ae6859667e293a4c40108f524408ae1289f2f 90635 |
|
24-Aug-2001 |
rbb |
Make the worker MPM shutdown and restart cleanly. This also
cleans up some race conditions, and gets the worker using
pools more cleanly.
Submitted by: [Aaron Bannert <aaron@clove.org>] |
39ec0caa195570eff38f6c2b0d022e7f45d56310 89930 |
|
05-Aug-2001 |
rbb |
Get the worker MPM working again. This should fix the serialization
problems, and it makes up initialize the queue only once. |
db68a93b6f008d48ce1c50ab59e153969ea5dbcf 89827 |
|
31-Jul-2001 |
rbb |
It helps if we broadcast to the workers that we are trying to shutdown. |
b1627fe7e2cb3809dcdfdf1fcbbb6dbccaf788c6 89781 |
|
30-Jul-2001 |
rbb |
Add the worker MPM. The name is probably horrible, but I couldn't come
up with anything better. This is a multiple-worker/single listener MPM.
This MPM is definately not complete, but it is a first step in the
right direction. |