summaryrefslogtreecommitdiffstats
path: root/server/mpm/eventopt/eventopt.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mpm_event(opt): avoid casts/comparisons from unsigned to signed (atomics).Yann Ylavic2014-12-051-8/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643279 13f79535-47bb-0310-9956-ffa450edef68
* mpm_event(opt), mpm_worker, mpm_prefork: follow up to r1635521, r1640161.Yann Ylavic2014-11-201-47/+53
| | | | | | | | | | | | | | 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
* mpm_event(opt), mpm_worker: follow up to r1635521.Yann Ylavic2014-11-171-6/+19
| | | | | | 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
* event, eventopt: follow up to r1638879 and r1639960.Yann Ylavic2014-11-161-22/+6
| | | | | | | 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
* avoid dereferencing a recently apr_pool_clear()'ed event_conn_state_t *csChristophe Jaillet2014-11-161-6/+12
| | | | | | | | 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
* MPMs, core: make duplicated listeners (SO_REUSEPORT) introduced in r1599531Yann Ylavic2014-10-301-51/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* core: follow up to r1629909: fix min_spare_threads lower bound and check wrt ↵Yann Ylavic2014-10-071-2/+4
| | | | | | num_buckets. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629990 13f79535-47bb-0310-9956-ffa450edef68
* core: ensure that MPMs return an error on runtime failure and hence thatYann Ylavic2014-10-071-1/+1
| | | | | | | | 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
* mpms: enforce assertion that unreachable code is not reached.Yann Ylavic2014-10-071-1/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1629918 13f79535-47bb-0310-9956-ffa450edef68
* core: Use process scoreboard to store each child's listener bucket,Yann Ylavic2014-10-071-43/+54
| | | | | | | | | | 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
* Mark all unused/duplicated/closed child listeners as inactive.Yann Ylavic2014-06-161-1/+1
| | | | | | | 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
* Revert r1601285 and r1601283.Yann Ylavic2014-06-091-64/+64
| | | | | | | | 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
* eventopt: fix duplicated APLOGNOs.Yann Ylavic2014-06-091-64/+64
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601283 13f79535-47bb-0310-9956-ffa450edef68
* mpm_event[opt]: Send the SSL close notify alert when the KeepAliveTimeoutYann Ylavic2014-06-081-0/+1
| | | | | | | expires. PR54998. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601185 13f79535-47bb-0310-9956-ffa450edef68
* -MPMs event & eventopt: child listeners are used in ONE_PROCESS mode too.Yann Ylavic2014-06-081-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1601171 13f79535-47bb-0310-9956-ffa450edef68
* Break out common code to be share-ableJim Jagielski2014-06-031-21/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599641 13f79535-47bb-0310-9956-ffa450edef68
* Update eventopt w/ bucket listenersJim Jagielski2014-06-031-37/+113
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599624 13f79535-47bb-0310-9956-ffa450edef68
* Now allow MPMs to call ap_log_common()Jim Jagielski2014-06-031-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599603 13f79535-47bb-0310-9956-ffa450edef68
* Fix some comment typosMike Rumph2014-05-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1594301 13f79535-47bb-0310-9956-ffa450edef68
* fix whitespace in a debug messageJeff Trawick2013-11-301-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1546730 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1538490:Jeff Trawick2013-11-261-0/+2
| | | | | | | 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
* r1545286 for eventoptJim Jagielski2013-11-251-8/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545292 13f79535-47bb-0310-9956-ffa450edef68
* revert 1544876Jim Jagielski2013-11-251-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1545130 13f79535-47bb-0310-9956-ffa450edef68
* Just critically warn people... but keep pushing through.Jim Jagielski2013-11-231-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1544876 13f79535-47bb-0310-9956-ffa450edef68
* c->sbh can be unexpectedly NULL when the thread that pulls the ready keepaliveEric Covener2013-11-041-1/+2
| | | | | | | | 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
* skiplist is now in apr 1.5 and aboveJim Jagielski2013-10-021-10/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1528437 13f79535-47bb-0310-9956-ffa450edef68
* Fix "unused variable" warning.Rainer Jung2013-06-191-2/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494531 13f79535-47bb-0310-9956-ffa450edef68
* subpoolJim Jagielski2013-06-181-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1494157 13f79535-47bb-0310-9956-ffa450edef68
* update log tagsStefan Fritsch2013-05-111-1/+1
| | | | | | | replace duplicate, add missing git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1481396 13f79535-47bb-0310-9956-ffa450edef68
* core, mod_ssl: Lift the restriction that prevents mod_ssl takingGraham Leggett2013-04-221-5/+14
| | | | | | | | | 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
* And now make aware... compile/build again :)Jim Jagielski2013-03-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451620 13f79535-47bb-0310-9956-ffa450edef68
* 1st phase of moving into httpd "core"Jim Jagielski2013-03-011-9/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451616 13f79535-47bb-0310-9956-ffa450edef68
* streamline TZ checkJim Jagielski2013-03-011-3/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451615 13f79535-47bb-0310-9956-ffa450edef68
* sync w/ current event bug-fixesJim Jagielski2013-03-011-90/+172
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1451614 13f79535-47bb-0310-9956-ffa450edef68
* resync w/ some event fixesJim Jagielski2013-02-201-11/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1448148 13f79535-47bb-0310-9956-ffa450edef68
* typosJim Jagielski2013-02-191-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447872 13f79535-47bb-0310-9956-ffa450edef68
* ensure positiveJim Jagielski2013-02-191-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1447871 13f79535-47bb-0310-9956-ffa450edef68
* Log a warning if ThreadStackSize has an inappropriate value.Christophe Jaillet2013-01-151-1/+7
| | | | | | | | | | 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
* Sometimes we miss the last few items in the Q dueJim Jagielski2012-11-211-1/+4
| | | | | | | 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
* The compiler *should* do this, but just in caseJim Jagielski2012-11-191-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1411361 13f79535-47bb-0310-9956-ffa450edef68
* Merge branch 'skiplist'Jim Jagielski2012-11-191-44/+42
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1411190 13f79535-47bb-0310-9956-ffa450edef68
* fdq expects a certain behavior from atomics... ensure thatJim Jagielski2012-11-161-0/+12
| | | | | | the event mpms check this. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410459 13f79535-47bb-0310-9956-ffa450edef68
* Fold in a missing optimization...Jim Jagielski2012-11-161-5/+23
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1410328 13f79535-47bb-0310-9956-ffa450edef68
* Prefer higher-mode polling, but allow for drop down to defaultJim Jagielski2012-11-151-2/+20
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1409878 13f79535-47bb-0310-9956-ffa450edef68
* no longer neededJim Jagielski2012-11-141-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1409273 13f79535-47bb-0310-9956-ffa450edef68
* Pull out the "extended" pod functions used by event and workerJim Jagielski2012-11-141-14/+14
| | | | | | | | to core, since it will be used by Simple and Lean and likely other MPMs. Avoid duplication. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1409214 13f79535-47bb-0310-9956-ffa450edef68
* Pull the event optimization MPM back into trunk. ThisJim Jagielski2012-11-091-0/+3328
provides more eyes and allows work to continue on it... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407533 13f79535-47bb-0310-9956-ffa450edef68