Commit 04a9b08a authored by Yann Ylavic's avatar Yann Ylavic
Browse files

Merge r1643279, r1703241, r1802535, r1819847, r1819848, r1819852, r1819853 from trunk:

mpm_event(opt): avoid casts/comparisons from unsigned to signed (atomics).


mpm_event/worker: make ap_queue_term() atomic (acquire/release the mutex once).


mpm_event: ap_queue_info_try_get_idler() may atomically decrement and then
re-increment the number idlers if it went under or to zero.  We can avoid
this by switching to a compare-and-swap scheme.


mpm_event: avoid unexpected compiler optimizations.

Make sure the compiler doesn't play games with our synchronization variables
by marking them volatile.


mpm_event: make sure wakeup_listener() does its minimal job.

Even if the listener thread is not created yet (i.e. about to be), we must
still tell it to leave, and terminate the worker queue in any case.


mpm_event: worker factor vs pollset.

Make sure the worker factor is at least one (w.r.t. WORKER_FACTOR_SCALE), and
use it to size the pollset appropriately (including K-A and lingering close
connections), in addition to the listening sockets.


mpm_event: remove atomics for timeout_queue's total counter.

It's always updated under the timeout_mutex lock, or read for logging and
scoreboard updates (not critical).

For the read cases a volatile access is enough, while removing the atomic ops
for the already protected write cases saves cycles and context switches.


Submitted by: ylavic
Reviewed by: ylavic, jim, icing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1823642 13f79535-47bb-0310-9956-ffa450edef68
parent bd6cc3d9
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment