You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2001/11/13 02:24:42 UTC

cvs commit: httpd-2.0/server/mpm/worker mpm.h worker.c

rbb         01/11/12 17:24:42

  Modified:    server   core.c
               server/mpm/mpmt_os2 mpm.h mpmt_os2_child.c
               server/mpm/netware mpm.h mpm_netware.c
               server/mpm/prefork mpm.h prefork.c
               server/mpm/spmt_os2 mpm.h spmt_os2.c
               server/mpm/threaded mpm.h threaded.c
               server/mpm/worker mpm.h worker.c
  Log:
  Remove more network logic from the MPMs.  Essentially, each MPM can define
  AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK, which tells Apache to disable_nagle
  on the accepted socket.
  
  Revision  Changes    Path
  1.90      +4 -0      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- core.c	2001/11/12 23:49:06	1.89
  +++ core.c	2001/11/13 01:24:41	1.90
  @@ -3281,6 +3281,10 @@
   {
       core_net_rec *net = apr_palloc(ptrans, sizeof(*net));
   
  +#ifdef AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
  +    ap_sock_disable_nagle(csd);
  +#endif
  +
       net->in_ctx = NULL;
       net->out_ctx = NULL;
       net->c = ap_core_new_connection(ptrans, ap_server_conf, csd,
  
  
  
  1.2       +1 -0      httpd-2.0/server/mpm/mpmt_os2/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_os2/mpm.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mpm.h	2001/08/17 17:07:34	1.1
  +++ mpm.h	2001/11/13 01:24:41	1.2
  @@ -70,5 +70,6 @@
   extern server_rec *ap_server_conf;
   #define AP_MPM_WANT_SET_PIDFILE
   #define AP_MPM_WANT_SET_MAX_REQUESTS
  +#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   
   #endif /* APACHE_MPM_SPMT_OS2_H */
  
  
  
  1.5       +0 -1      httpd-2.0/server/mpm/mpmt_os2/mpmt_os2_child.c
  
  Index: mpmt_os2_child.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_os2/mpmt_os2_child.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mpmt_os2_child.c	2001/11/12 23:49:07	1.4
  +++ mpmt_os2_child.c	2001/11/13 01:24:41	1.5
  @@ -406,7 +406,6 @@
       while (rc = DosReadQueue(workq, &rd, &len, (PPVOID)&worker_args, 0, DCWW_WAIT, &priority, NULLHANDLE),
              rc == 0 && rd.ulData != WORKTYPE_EXIT) {
           pconn = worker_args->pconn;
  -        ap_sock_disable_nagle(worker_args->conn_sd);
           current_conn = ap_run_create_connection(pconn, worker_args->conn_sd, conn_id);
   
           if (current_conn) {
  
  
  
  1.3       +1 -0      httpd-2.0/server/mpm/netware/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mpm.h	2001/10/29 23:01:46	1.2
  +++ mpm.h	2001/11/13 01:24:41	1.3
  @@ -72,6 +72,7 @@
     #define AP_MPM_WANT_SET_LOCKFILE 
   */
   #define AP_MPM_WANT_SET_MAX_REQUESTS
  +#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   /*#define AP_MPM_WANT_SET_COREDUMPDIR
     #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH 
   */
  
  
  
  1.9       +0 -2      httpd-2.0/server/mpm/netware/mpm_netware.c
  
  Index: mpm_netware.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm_netware.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mpm_netware.c	2001/11/12 23:49:07	1.8
  +++ mpm_netware.c	2001/11/13 01:24:41	1.9
  @@ -504,8 +504,6 @@
           * We now have a connection, so set it up with the appropriate
           * socket options, file descriptors, and read/write buffers.
           */
  -        ap_sock_disable_nagle(csd);
  -
           current_conn = ap_run_create_connection(ptrans, csd, my_worker_num);
           if (current_conn) {
               ap_process_connection(current_conn);
  
  
  
  1.16      +1 -0      httpd-2.0/server/mpm/prefork/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/mpm.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mpm.h	2001/08/13 18:24:53	1.15
  +++ mpm.h	2001/11/13 01:24:41	1.16
  @@ -77,6 +77,7 @@
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_COREDUMPDIR
   #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  +#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   
   #define AP_MPM_USES_POD 1
   #define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
  
  
  
  1.213     +0 -2      httpd-2.0/server/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- prefork.c	2001/11/12 23:49:07	1.212
  +++ prefork.c	2001/11/13 01:24:41	1.213
  @@ -787,8 +787,6 @@
           }
   #endif
   
  -	ap_sock_disable_nagle(csd);
  -
   	current_conn = ap_run_create_connection(ptrans, csd, my_child_num);
           if (current_conn) {
               ap_process_connection(current_conn);
  
  
  
  1.11      +1 -0      httpd-2.0/server/mpm/spmt_os2/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/mpm.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mpm.h	2001/08/14 12:20:54	1.10
  +++ mpm.h	2001/11/13 01:24:41	1.11
  @@ -71,6 +71,7 @@
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_COREDUMPDIR
   #define AP_MPM_WANT_PROCESS_CHILD_STATUS
  +#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   
   extern server_rec *ap_server_conf;
   extern int ap_threads_per_child;
  
  
  
  1.107     +0 -3      httpd-2.0/server/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- spmt_os2.c	2001/11/12 23:49:07	1.106
  +++ spmt_os2.c	2001/11/13 01:24:41	1.107
  @@ -677,9 +677,6 @@
   	 * We now have a connection, so set it up with the appropriate
   	 * socket options, file descriptors, and read/write buffers.
   	 */
  -
  -	ap_sock_disable_nagle(csd);
  -
   	current_conn = ap_run_create_connection(ptrans, csd,
                                            THREAD_GLOBAL(thread_num));
   
  
  
  
  1.9       +1 -0      httpd-2.0/server/mpm/threaded/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/mpm.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mpm.h	2001/08/13 18:24:53	1.8
  +++ mpm.h	2001/11/13 01:24:42	1.9
  @@ -74,6 +74,7 @@
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_COREDUMPDIR
   #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  +#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   
   #define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
   #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
  
  
  
  1.71      +0 -2      httpd-2.0/server/mpm/threaded/threaded.c
  
  Index: threaded.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/threaded/threaded.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- threaded.c	2001/11/12 23:49:07	1.70
  +++ threaded.c	2001/11/13 01:24:42	1.71
  @@ -473,8 +473,6 @@
           return;
       }
   
  -    ap_sock_disable_nagle(sock);
  -
       current_conn = ap_run_create_connection(p, sock, conn_id);
       if (current_conn) {
           ap_process_connection(current_conn);
  
  
  
  1.5       +1 -0      httpd-2.0/server/mpm/worker/mpm.h
  
  Index: mpm.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/mpm.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mpm.h	2001/08/13 18:24:53	1.4
  +++ mpm.h	2001/11/13 01:24:42	1.5
  @@ -74,6 +74,7 @@
   #define AP_MPM_WANT_SET_MAX_REQUESTS
   #define AP_MPM_WANT_SET_COREDUMPDIR
   #define AP_MPM_WANT_SET_ACCEPT_LOCK_MECH
  +#define AP_MPM_DISABLE_NAGLE_ACCEPTED_SOCK
   
   #define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image())
   #define MPM_CHILD_PID(i) (ap_scoreboard_image->parent[i].pid)
  
  
  
  1.36      +0 -2      httpd-2.0/server/mpm/worker/worker.c
  
  Index: worker.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/worker.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- worker.c	2001/11/12 23:49:08	1.35
  +++ worker.c	2001/11/13 01:24:42	1.36
  @@ -497,8 +497,6 @@
           return;
       }
   
  -    ap_sock_disable_nagle(sock);
  -
       current_conn = ap_run_create_connection(p, sock, conn_id);
       if (current_conn) {
           ap_process_connection(current_conn);