httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r1202259 - /httpd/httpd/trunk/server/mpm/event/event.c
Date Tue, 15 Nov 2011 15:52:59 GMT
Author: pquerna
Date: Tue Nov 15 15:52:59 2011
New Revision: 1202259

URL: http://svn.apache.org/viewvc?rev=1202259&view=rev
Log:
Use apr_pollset_wakeup to ensure that the listener thread will process most enqueue'd events
quickly

Modified:
    httpd/httpd/trunk/server/mpm/event/event.c

Modified: httpd/httpd/trunk/server/mpm/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/event/event.c?rev=1202259&r1=1202258&r2=1202259&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/event/event.c Tue Nov 15 15:52:59 2011
@@ -836,6 +836,7 @@ static int start_lingering_close(conn_st
         v->cs = cs;
         if (eq != NULL) {
             ap_equeue_writer_onward(eq);
+            apr_pollset_wakeup(event_pollset);
         }
         else {
             process_pollop(v);
@@ -994,6 +995,7 @@ read_request:
             v->tag = "process_socket(write_completion)";
 
             ap_equeue_writer_onward(eq);
+            apr_pollset_wakeup(event_pollset);
             return 1;
         }
         else if (c->keepalive != AP_CONN_KEEPALIVE || c->aborted ||
@@ -1035,6 +1037,7 @@ read_request:
         cs->pfd.reqevents = APR_POLLIN;
         v->tag = "process_socket(keepalive)";
         ap_equeue_writer_onward(eq);
+        apr_pollset_wakeup(event_pollset);
     }
     return 1;
 }
@@ -1944,7 +1947,7 @@ static void *APR_THREAD_FUNC start_threa
                                                 * connections in K-A or lingering
                                                 * close?
                                                 */
-                            pchild, APR_POLLSET_NOCOPY);
+                            pchild, APR_POLLSET_WAKEABLE|APR_POLLSET_NOCOPY);
     if (rv != APR_SUCCESS) {
         ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
                      "apr_pollset_create with Thread Safety failed.");
@@ -2860,7 +2863,7 @@ static int event_pre_config(apr_pool_t *
     ++retained->module_loads;
     if (retained->module_loads == 2) {
         rv = apr_pollset_create(&event_pollset, 1, plog,
-                                APR_POLLSET_NOCOPY);
+                                APR_POLLSET_WAKEABLE|APR_POLLSET_NOCOPY);
         if (rv != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
                          "Couldn't create a suiteable pollset. "



Mime
View raw message