1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-13 21:42:17 +03:00
Commit Graph

64 Commits

Author SHA1 Message Date
Eric Covener
48d36db55b r1651088 for eventopt
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1651089 13f79535-47bb-0310-9956-ffa450edef68
2015-01-12 13:45:30 +00:00
Yann Ylavic
e6d70ea7bc mpm_event(opt): zero is immutable.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643284 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 14:00:37 +00:00
Yann Ylavic
abb1b803d6 mpm_event(opt): avoid casts/comparisons from unsigned to signed (atomics).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643279 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 13:41:38 +00:00
Yann Ylavic
4669bc745b mpm_event(opt), mpm_worker, mpm_prefork: follow up to r1635521, r1640161.
Retain num_buckets and max_buckets accross restarts so that we can determine
whether new buckets were allocated and set their idle_spawn_rate at the same
level as the existing ones (max).

Also, adjust ap_daemons_limit and ap_daemons_to_start lower bounds at mpm_run()
time, once num_buckets is available for the current generation (previously done
at check_config time, hence before num_buckets is computed, and then with the
previous generation's value).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640763 13f79535-47bb-0310-9956-ffa450edef68
2014-11-20 16:26:04 +00:00
Yann Ylavic
9d670bcfdf mpm_event(opt), mpm_worker: follow up to r1635521.
Allocate retained idle_spawn_rate vector on the process pool.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640161 13f79535-47bb-0310-9956-ffa450edef68
2014-11-17 13:59:36 +00:00
Yann Ylavic
f1cb9b287a event, eventopt: follow up to r1638879 and r1639960.
Clear the pool in ap_push_pool() before recycling.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640031 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 21:32:48 +00:00
Christophe Jaillet
ebbed36037 avoid dereferencing a recently apr_pool_clear()'ed event_conn_state_t *cs
in several paths where ptrans is being recycled at the end of a request.

Same as r1638879 which was for the event MPM.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1639960 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 05:55:14 +00:00
Yann Ylavic
61d5a3c1ca MPMs, core: make duplicated listeners (SO_REUSEPORT) introduced in r1599531
less intrusive.

Submitted by: Yingqi Lu <yingqi.lu@intel.com>
Modified/Committed by: ylavic

Add ListenCoresBucketsRatio which is a configurable ratio between the number of
CPU cores (online) and the number of listeners buckets to create, defaulting to
zero (so that listeners buckets become an opt-in, ie. ncpus / ratio > 1).
This could also be made an opt-out by using the previous hardcoded value (8) as
default.

Make ap_close_listeners() act on all the listeners (including duplicated ones),
since the function is also called externally (eg. mod_cgid, mod_ssl_ct and
possibly any third party module) to cleanup opened descriptors when a process
is forked (the duplicated listeners are kept in a scoped/static variable).

Add ap_close_listeners_ex() to close a single bucket of listeners, used by the
children to close unused duplicates and internally by ap_close_listeners().

Make ap_duplicate_listeners() compute the number of buckets to be used, instead
of each MPM. This number is now based on the above ratio and will not change
unless asked to (given *num_buckets < 1, that is when the MPM does not run in
one-process mode nor after a graceful restart).

Remove some global variables (mpm_listen, enable_default_listeners) previously
used to communicate between MPMs and ap_listen, since ap_duplicate_listeners()
API can now be used to do so.
Also rename num_buckets as ap_num_listen_buckets, and prefix have_so_reuseport
with ap_ (both printed by ap_log_common(), hence kept global).
Detect ap_have_so_reuseport once only at startup.

Restore dummy_connection() as before r1599531 since sending POD signals should
not depend on the number of listeners buckets (there is still one single socket
receiving the connections).

For each MPM (concerned), move the bucket data (pod, listeners and eventually
accept mutex) into a struct and instanciate an array of them (sized by the
number of buckets), for each child to use its own data according to its bucket
index, and the parent to maintain the whole.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1635521 13f79535-47bb-0310-9956-ffa450edef68
2014-10-30 15:24:58 +00:00
Yann Ylavic
7ecfc45fdf core: follow up to r1629909: fix min_spare_threads lower bound and check wrt num_buckets.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629990 13f79535-47bb-0310-9956-ffa450edef68
2014-10-07 21:59:02 +00:00
Yann Ylavic
d2bec9df64 core: ensure that MPMs return an error on runtime failure and hence that
httpd's main process also exits with an error.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629925 13f79535-47bb-0310-9956-ffa450edef68
2014-10-07 16:54:31 +00:00
Yann Ylavic
90d30c63e0 mpms: enforce assertion that unreachable code is not reached.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629918 13f79535-47bb-0310-9956-ffa450edef68
2014-10-07 15:46:05 +00:00
Yann Ylavic
a527db4331 core: Use process scoreboard to store each child's listener bucket,
and silently adjust the configured number of processes/threads to
be above the computed number of listener buckets (depending on the
CPU cores).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629909 13f79535-47bb-0310-9956-ffa450edef68
2014-10-07 15:16:02 +00:00
Yann Ylavic
d2e9cc1e16 Mark all unused/duplicated/closed child listeners as inactive.
Fix unused "ap_listen_rec *lr;" in worker_run().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602826 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 09:28:01 +00:00
Yann Ylavic
bac2d32f4c Revert r1601285 and r1601283.
Shouldn't have commited the latter without disussing it on dev@.
Since the former creates upper APLOGNOs, revert and then recommit with the reverted next tag number.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601290 13f79535-47bb-0310-9956-ffa450edef68
2014-06-09 00:59:04 +00:00
Yann Ylavic
3c091e0eb1 eventopt: fix duplicated APLOGNOs.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601283 13f79535-47bb-0310-9956-ffa450edef68
2014-06-09 00:15:30 +00:00
Yann Ylavic
ff0963e3f7 mpm_event[opt]: Send the SSL close notify alert when the KeepAliveTimeout
expires. PR54998.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601185 13f79535-47bb-0310-9956-ffa450edef68
2014-06-07 22:57:08 +00:00
Yann Ylavic
899a843490 -MPMs event & eventopt: child listeners are used in ONE_PROCESS mode too.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601171 13f79535-47bb-0310-9956-ffa450edef68
2014-06-07 22:24:59 +00:00
Jim Jagielski
db0457b3b2 Break out common code to be share-able
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599641 13f79535-47bb-0310-9956-ffa450edef68
2014-06-03 16:02:44 +00:00
Jim Jagielski
a80b326889 Update eventopt w/ bucket listeners
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599624 13f79535-47bb-0310-9956-ffa450edef68
2014-06-03 15:46:48 +00:00
Jim Jagielski
cdf5c0570f Now allow MPMs to call ap_log_common()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599603 13f79535-47bb-0310-9956-ffa450edef68
2014-06-03 15:25:59 +00:00
Mike Rumph
ebd3ed2bf8 Fix some comment typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594301 13f79535-47bb-0310-9956-ffa450edef68
2014-05-13 17:50:39 +00:00
Jeff Trawick
2571d1f90c fix whitespace in a debug message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546730 13f79535-47bb-0310-9956-ffa450edef68
2013-11-30 14:06:55 +00:00
Jeff Trawick
88e5f7cc40 Follow-up to r1538490:
Ensure that conn_rec->sbh is always cleared when returning from process_socket().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545736 13f79535-47bb-0310-9956-ffa450edef68
2013-11-26 17:11:51 +00:00
Jim Jagielski
18070dd81a Consistent types (2nd commit for future backport ease)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545412 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:24:20 +00:00
Jim Jagielski
d21042e2a8 naming suggestion re: trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545408 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 21:10:05 +00:00
Jim Jagielski
43625092ad Use offset which is smack dab in the middle.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545364 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 18:28:53 +00:00
Jim Jagielski
cc4921ed2f Use correct type...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545325 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 15:40:16 +00:00
Jim Jagielski
6eb75cff89 r1545286 for eventopt
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545292 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 14:08:17 +00:00
Jim Jagielski
320f4d382e revert 1544876
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545130 13f79535-47bb-0310-9956-ffa450edef68
2013-11-25 01:32:53 +00:00
Jim Jagielski
ab81fdf796 Just critically warn people... but keep pushing through.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544876 13f79535-47bb-0310-9956-ffa450edef68
2013-11-23 20:29:55 +00:00
Eric Covener
b6e7d2dbf0 c->sbh can be unexpectedly NULL when the thread that pulls the ready keepalive
connection out of the queue laps the thread that put it on the queue.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1538490 13f79535-47bb-0310-9956-ffa450edef68
2013-11-04 01:37:31 +00:00
Jeff Trawick
2bd622626f Disable event/eventopt if apr skiplist isn't available
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1529442 13f79535-47bb-0310-9956-ffa450edef68
2013-10-05 12:44:36 +00:00
Jim Jagielski
898365fd1d skiplist is now in apr 1.5 and above
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528437 13f79535-47bb-0310-9956-ffa450edef68
2013-10-02 12:12:36 +00:00
Rainer Jung
67e9e54493 Fix "unused variable" warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494531 13f79535-47bb-0310-9956-ffa450edef68
2013-06-19 10:16:03 +00:00
Jim Jagielski
a3aff5b836 subpool
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494157 13f79535-47bb-0310-9956-ffa450edef68
2013-06-18 14:31:36 +00:00
Stefan Fritsch
ca2948ea2d update log tags
replace duplicate, add missing


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481396 13f79535-47bb-0310-9956-ffa450edef68
2013-05-11 19:45:09 +00:00
Graham Leggett
a47569f7c1 core, mod_ssl: Lift the restriction that prevents mod_ssl taking
full advantage of the event MPM. Enable the ability for a module
to reverse the sense of a poll event from a read to a write or vice
versa.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1470679 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:48:25 +00:00
Jim Jagielski
9c4a88068a And now make aware... compile/build again :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451620 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:36:00 +00:00
Jim Jagielski
a06c6b096e Move skiplist to core
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451618 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:29:30 +00:00
Jim Jagielski
78f315375a sync
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451617 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:24:25 +00:00
Jim Jagielski
18ad4754d8 1st phase of moving into httpd "core"
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451616 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:24:05 +00:00
Jim Jagielski
de1f4ca41b streamline TZ check
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451615 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:24:02 +00:00
Jim Jagielski
fdee075e67 sync w/ current event bug-fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451614 13f79535-47bb-0310-9956-ffa450edef68
2013-03-01 15:23:58 +00:00
Jim Jagielski
0e9846c693 resync w/ some event fixes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1448148 13f79535-47bb-0310-9956-ffa450edef68
2013-02-20 13:11:29 +00:00
Jim Jagielski
8fee5391ff typos
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447872 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 19:08:53 +00:00
Jim Jagielski
72f579f5fc ensure positive
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447871 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 19:08:24 +00:00
Christophe Jaillet
08b6d16ffc Log a warning if ThreadStackSize has an inappropriate value.
PR : 54311
Submitted by: Tianyin Xu <tixu cs ucsd edu>

Only event.c has been compiled on my system. The 2 others are just cut and paste.
I have left the same value for APLOGNO in event and eventopt has for the other logged messages. I don't know if it is the right way to do.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1433682 13f79535-47bb-0310-9956-ffa450edef68
2013-01-15 21:53:07 +00:00
Jim Jagielski
4e11083cde Fix peek
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1415753 13f79535-47bb-0310-9956-ffa450edef68
2012-11-30 17:24:01 +00:00
Jim Jagielski
baf137d08f Sometimes we miss the last few items in the Q due
to time fuzzyness. Force the full Q by adding an extra
2sec fudge factor

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1412086 13f79535-47bb-0310-9956-ffa450edef68
2012-11-21 13:21:01 +00:00
Jim Jagielski
ab9803fcd7 Bug from not using pools by default :)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1411715 13f79535-47bb-0310-9956-ffa450edef68
2012-11-20 16:03:09 +00:00