httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r307334 - in /httpd/httpd/branches/async-dev/server/mpm/experimental/event: Makefile.in event.c event_filters.c
Date Sat, 08 Oct 2005 23:53:54 GMT
Author: brianp
Date: Sat Oct  8 16:53:51 2005
New Revision: 307334

URL: http://svn.apache.org/viewcvs?rev=307334&view=rev
Log:
Forward-port of the latest event MPM code from the 2.3-dev trunk into
the async-dev branch

Removed:
    httpd/httpd/branches/async-dev/server/mpm/experimental/event/event_filters.c
Modified:
    httpd/httpd/branches/async-dev/server/mpm/experimental/event/Makefile.in
    httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c

Modified: httpd/httpd/branches/async-dev/server/mpm/experimental/event/Makefile.in
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/async-dev/server/mpm/experimental/event/Makefile.in?rev=307334&r1=307333&r2=307334&view=diff
==============================================================================
--- httpd/httpd/branches/async-dev/server/mpm/experimental/event/Makefile.in (original)
+++ httpd/httpd/branches/async-dev/server/mpm/experimental/event/Makefile.in Sat Oct  8 16:53:51
2005
@@ -1,5 +1,5 @@
 
 LTLIBRARY_NAME    = libevent.la
-LTLIBRARY_SOURCES = event.c event_filters.c fdqueue.c pod.c
+LTLIBRARY_SOURCES = event.c fdqueue.c pod.c
 
 include $(top_srcdir)/build/ltlib.mk

Modified: httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c?rev=307334&r1=307333&r2=307334&view=diff
==============================================================================
--- httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c (original)
+++ httpd/httpd/branches/async-dev/server/mpm/experimental/event/event.c Sat Oct  8 16:53:51
2005
@@ -336,9 +336,6 @@
     case AP_MPMQ_IS_ASYNC:
         *result = 1;
         return APR_SUCCESS;
-    case AP_MPMQ_CUSTOM_WRITE:
-        *result = 0;
-        return APR_SUCCESS;
     case AP_MPMQ_HARD_LIMIT_DAEMONS:
         *result = server_limit;
         return APR_SUCCESS;
@@ -610,9 +607,8 @@
          * accept() with a socket readability check, like Win32, 
          * and there are measurable delays before the
          * socket is readable due to the first data packet arriving,
-         * it might be better to create the cs on the listener thread,
-         * set the state to CONN_STATE_CHECK_REQUEST_LINE_READABLE,
-         * and give it to the event thread.
+         * it might be better to create the cs on the listener thread
+         * with the state set to CONN_STATE_CHECK_REQUEST_LINE_READABLE
          *
          * FreeBSD users will want to enable the HTTP accept filter 
          * module in their kernel for the highest performance
@@ -663,13 +659,12 @@
         cs->expiration_time = ap_server_conf->keep_alive_timeout + time_now;
         apr_thread_mutex_lock(timeout_mutex);
         APR_RING_INSERT_TAIL(&timeout_head, cs, conn_state_t, timeout_list);
+        apr_thread_mutex_unlock(timeout_mutex);
 
         pt->status = 0;
         /* Add work to pollset. These are always read events */
         rc = apr_pollset_add(event_pollset, &cs->pfd);
 
-        apr_thread_mutex_unlock(timeout_mutex);
-
         if (rc != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
                          "process_socket: apr_pollset_add failure");
@@ -833,16 +828,6 @@
      */
 #define TIMEOUT_FUDGE_FACTOR 100000
 
-    /* POLLSET_SCALE_FACTOR * ap_threads_per_child sets the size of
-     * the pollset.  I've seen 15 connections per active worker thread
-     * running SPECweb99. 
-     *
-     * However, with the newer apr_pollset, this is the number of sockets that
-     * we will return to any *one* call to poll().  Therefore, there is no
-     * reason to make it more than ap_threads_per_child.
-     */
-#define POLLSET_SCALE_FACTOR 1
-
     rc = apr_thread_mutex_create(&timeout_mutex, APR_THREAD_MUTEX_DEFAULT,
                                  tpool);
     if (rc != APR_SUCCESS) {
@@ -857,7 +842,7 @@
 
     /* Create the main pollset */
     rc = apr_pollset_create(&event_pollset,
-                            ap_threads_per_child * POLLSET_SCALE_FACTOR,
+                            ap_threads_per_child,
                             tpool, APR_POLLSET_THREADSAFE);
     if (rc != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rc, ap_server_conf,
@@ -945,13 +930,12 @@
             }
             else {
                 /* A Listener Socket is ready for an accept() */
-                apr_pool_t *recycled_pool = NULL;
 
                 lr = (ap_listen_rec *) pt->baton;
 
-                ap_pop_pool(&recycled_pool, worker_queue_info);
+                ap_pop_pool(&ptrans, worker_queue_info);
 
-                if (recycled_pool == NULL) {
+                if (ptrans == NULL) {
                     /* create a new transaction pool for each accepted socket */
                     apr_allocator_t *allocator;
 
@@ -967,9 +951,6 @@
                         signal_threads(ST_GRACEFUL);
                         return NULL;
                     }
-                }
-                else {
-                    ptrans = recycled_pool;
                 }
 
                 apr_pool_tag(ptrans, "transaction");



Mime
View raw message