manoj       99/06/30 12:01:10

  Modified:    .        STATUS
               pthreads/src/main http_accept.c
  Log:
  Blah. Since poll probably shouldn't be called from multiple threads on
  the same pollfd strucuture at the same time, and also because restarts
  will be hosed otherwise, disable support for
  SINGLE_LISTEN_UNSERIALIZED_ACCEPT.
  
  Revision  Changes    Path
  1.28      +1 -7      apache-apr/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/apache-apr/STATUS,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -d -u -r1.27 -r1.28
  --- STATUS    1999/06/28 21:58:27     1.27
  +++ STATUS    1999/06/30 19:01:01     1.28
  @@ -1,5 +1,5 @@
   Apache Portable Runtime STATUS:
  -Last modified at [$Date: 1999/06/28 21:58:27 $]
  +Last modified at [$Date: 1999/06/30 19:01:01 $]
   
   Release:
   
  @@ -42,12 +42,6 @@
       Everything
   
   Needs patch:
  -
  -  If SINGLE_LISTEN_UNSERIALIZED_ACCEPT is active, multiple threads are
  -  allowes to call poll() at the same time, with the same pollfd array.
  -  The only solution Manoj can think of right now is to have one pollfd
  -  array per thread, or to just always require serialization (bleh on
  -  both counts).
   
     With AIX 4.2, if MaxRequestsPerChild is low (e.g. 5) and
     ThreadsPerChild is high (e.g. 64), the signal delivered to sigwait
  
  
  
  1.20      +7 -16     apache-apr/pthreads/src/main/http_accept.c
  
  Index: http_accept.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_accept.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -d -u -r1.19 -r1.20
  --- http_accept.c     1999/06/29 00:18:03     1.19
  +++ http_accept.c     1999/06/30 19:01:06     1.20
  @@ -74,13 +74,9 @@
   
   #if defined (USE_ACCEPT_QUEUE)
   
  -#ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -/* Each thread only listens to one socket in this model, so the starvation
  - * problem described in manual/misc/perf-tuning.html can't occur here */
  -#define SAFE_ACCEPT(stmt) 
  -#else
  +/* In the current state of the server, It is never safe not to do accept
  + * serialization. Maybe we can change this. */
   #define SAFE_ACCEPT(stmt) do {stmt;} while(0)
  -#endif
   
   /* The queue of sockets we've accepted */
   static FDQueue csd_queue;
  @@ -290,16 +286,15 @@
   
   #elif defined(USE_MULTI_ACCEPT)
   
  -#ifdef SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -#define SAFE_ACCEPT(stmt) do {if(ap_listeners->next != NULL) {stmt;}} 
while(0)
  -#else
  -#define SAFE_ACCEPT(stmt) do {stmt;} while(0)
  -#endif
  -
   /*
    * USE_MULTI_ACCEPT
    * Worker threads do the accept and process the request. 
    */
  +
  +/* In the current state of the server, It is never safe not to do accept
  + * serialization. Maybe we can change this. */
  +#define SAFE_ACCEPT(stmt) do {stmt;} while(0)
  +
   static struct pollfd *listenfds;
   static int last_pollfd = 0; /* 0 = ap_pipe_of_death */
   
  @@ -401,10 +396,6 @@
                   continue;
               }
   
  -         /* This conditional is used because the single listen case is the
  -          * only one where the accept might not be serialized. In that
  -          * case, multiple threads mucking around with the listenfds array
  -          *  and last_pollfd */
               if (num_listenfds == 1) {
                /* only one socket, just pretend we did the other stuff */
                sd = ap_listeners->fd;
  
  
  

Reply via email to