apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grega...@apache.org
Subject svn commit: r500321 - in /apr/apr/trunk: include/arch/unix/apr_arch_poll_private.h poll/unix/epoll.c
Date Fri, 26 Jan 2007 20:04:27 GMT
Author: gregames
Date: Fri Jan 26 12:04:26 2007
New Revision: 500321

URL: http://svn.apache.org/viewvc?view=rev&rev=500321
Log:
apr_pollset_remove: speed up the httpd Event MPM when lots of connections are
in use

epoll/Linux only for now.  ./buildconf on FreeBSD (minotaur) spewed tons of
errors; hints appreciated

Modified:
    apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
    apr/apr/trunk/poll/unix/epoll.c

Modified: apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h?view=diff&rev=500321&r1=500320&r2=500321
==============================================================================
--- apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h (original)
+++ apr/apr/trunk/include/arch/unix/apr_arch_poll_private.h Fri Jan 26 12:04:26 2007
@@ -91,8 +91,8 @@
 typedef struct pfd_elem_t pfd_elem_t;
 
 struct pfd_elem_t {
-    APR_RING_ENTRY(pfd_elem_t) link;
     apr_pollfd_t pfd;
+    APR_RING_ENTRY(pfd_elem_t) link;
 };
 
 #endif

Modified: apr/apr/trunk/poll/unix/epoll.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/poll/unix/epoll.c?view=diff&rev=500321&r1=500320&r2=500321
==============================================================================
--- apr/apr/trunk/poll/unix/epoll.c (original)
+++ apr/apr/trunk/poll/unix/epoll.c Fri Jan 26 12:04:26 2007
@@ -219,18 +219,10 @@
         pollset_lock_rings();
 
         if (!APR_RING_EMPTY(&(pollset->query_ring), pfd_elem_t, link)) {
-            for (ep = APR_RING_FIRST(&(pollset->query_ring));
-                 ep != APR_RING_SENTINEL(&(pollset->query_ring),
-                                         pfd_elem_t, link);
-                 ep = APR_RING_NEXT(ep, link)) {
+            ep = (pfd_elem_t *) descriptor;
                 
-                if (descriptor->desc.s == ep->pfd.desc.s) {
-                    APR_RING_REMOVE(ep, link);
-                    APR_RING_INSERT_TAIL(&(pollset->dead_ring),
-                                         ep, pfd_elem_t, link);
-                    break;
-                }
-            }
+            APR_RING_REMOVE(ep, link);
+            APR_RING_INSERT_TAIL(&(pollset->dead_ring), ep, pfd_elem_t, link);
         }
 
         pollset_unlock_rings();



Mime
View raw message