httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-apr/pthreads/src/main fdqueue.c http_main.c
Date Wed, 03 Mar 1999 16:02:46 GMT
rbb         99/03/03 08:02:46

  Modified:    pthreads/src/main fdqueue.c http_main.c
  Log:
  Performance improvement, so we don't overfill our fdqueue array.  I am just moving
  where we update how much blanks space we have in the array, so we don't get the
  blank space back until the worker thread has finished serving the request.
  
  Revision  Changes    Path
  1.12      +9 -1      apache-apr/pthreads/src/main/fdqueue.c
  
  Index: fdqueue.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/pthreads/src/main/fdqueue.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- fdqueue.c	1999/02/23 19:11:21	1.11
  +++ fdqueue.c	1999/03/03 16:02:45	1.12
  @@ -60,7 +60,6 @@
       queue->data[queue->head].fd = -1;
       if (fd != -1) {
           queue->head = (queue->head + 1) % queue->bounds;
  -        queue->blanks++;
       }
       if (pthread_mutex_unlock(&queue->one_big_mutex) != 0) {
           return FD_QUEUE_FAILURE;
  @@ -86,3 +85,12 @@
       }
   }
   
  +int increase_blanks(FDQueue *queue) {
  +    if (pthread_mutex_lock(&queue->one_big_mutex) != 0) {
  +        return FD_QUEUE_FAILURE;
  +    }
  +    queue->blanks++;
  +    if (pthread_mutex_unlock(&queue->one_big_mutex) != 0) {
  +        return FD_QUEUE_FAILURE;
  +    }
  +}
  
  
  
  1.56      +1 -1      apache-apr/pthreads/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_main.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- http_main.c	1999/02/24 20:30:17	1.55
  +++ http_main.c	1999/03/03 16:02:45	1.56
  @@ -2401,7 +2401,7 @@
           csd = queue_pop(&csd_queue, &sa_client);
   	if (csd >= 0) {
   	    process_socket(ptrans, &sa_client, csd, my_pid, my_tid);
  -	    /*increase_blanks(&csd_queue);*/
  +	    increase_blanks(&csd_queue);
           } 
   	ap_clear_pool(ptrans);
       }
  
  
  

Mime
View raw message