Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 19450 invoked by uid 500); 10 Jul 2000 22:08:13 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 19435 invoked by uid 500); 10 Jul 2000 22:08:12 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 10 Jul 2000 22:08:12 -0000 Message-ID: <20000710220812.19423.qmail@locus.apache.org> From: rbb@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c rbb 00/07/10 15:08:11 Modified: src/include mpm_common.h src/main mpm_common.c src/modules/mpm/beos beos.c src/modules/mpm/dexter dexter.c src/modules/mpm/mpmt mpmt.c src/modules/mpm/mpmt_pthread mpmt_pthread.c src/modules/mpm/prefork prefork.c src/modules/mpm/spmt_os2 spmt_os2.c Log: Move sock_disable_nagle to mpm_common.c. Rename it to ap_sock_disable_nagle. Again, I tried to modify all MPMs that are currently using this code. Revision Changes Path 1.5 +6 -0 apache-2.0/src/include/mpm_common.h Index: mpm_common.h =================================================================== RCS file: /home/cvs/apache-2.0/src/include/mpm_common.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mpm_common.h 2000/07/10 18:21:19 1.4 +++ mpm_common.h 2000/07/10 22:08:07 1.5 @@ -77,6 +77,12 @@ void ap_reclaim_child_processes(int terminate); void ap_wait_or_timeout(ap_wait_t *status, ap_proc_t *ret, ap_pool_t *p); void ap_process_child_status(ap_proc_t *pid, ap_wait_t status); +#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) +void ap_sock_disable_nagle(int s); +#else +#define ap_sock_disable_nagle(s) /* NOOP */ +#endif + #define AP_MPM_HARD_LIMITS_FILE "src/" APACHE_MPM_DIR "/mpm_default.h" 1.21 +20 -0 apache-2.0/src/main/mpm_common.c Index: mpm_common.c =================================================================== RCS file: /home/cvs/apache-2.0/src/main/mpm_common.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- mpm_common.c 2000/07/10 18:21:19 1.20 +++ mpm_common.c 2000/07/10 22:08:07 1.21 @@ -276,4 +276,24 @@ } } +#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) +void ap_sock_disable_nagle(int s) +{ + /* The Nagle algorithm says that we should delay sending partial + * packets in hopes of getting more data. We don't want to do + * this; we are not telnet. There are bad interactions between + * persistent connections and Nagle's algorithm that have very severe + * performance penalties. (Failing to disable Nagle is not much of a + * problem with simple HTTP.) + * + * In spite of these problems, failure here is not a shooting offense. + */ + int just_say_no = 1; + if (ap_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no, + sizeof(int)) != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, + "setsockopt: (TCP_NODELAY)"); + } +} +#endif 1.9 +0 -2 apache-2.0/src/modules/mpm/beos/beos.c Index: beos.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/beos/beos.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- beos.c 2000/07/10 21:37:14 1.8 +++ beos.c 2000/07/10 22:08:08 1.9 @@ -293,8 +293,6 @@ * Here follows a long bunch of generic server bookkeeping stuff... */ -//#define sock_disable_nagle(s) /* NOOP */ - int ap_graceful_stop_signalled(void) { /* XXX - Does this really work? - Manoj */ 1.112 +1 -26 apache-2.0/src/modules/mpm/dexter/dexter.c Index: dexter.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -r1.111 -r1.112 --- dexter.c 2000/07/10 21:37:16 1.111 +++ dexter.c 2000/07/10 22:08:08 1.112 @@ -380,31 +380,6 @@ * Here follows a long bunch of generic server bookkeeping stuff... */ -#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(int s) -{ - /* The Nagle algorithm says that we should delay sending partial - * packets in hopes of getting more data. We don't want to do - * this; we are not telnet. There are bad interactions between - * persistent connections and Nagle's algorithm that have very severe - * performance penalties. (Failing to disable Nagle is not much of a - * problem with simple HTTP.) - * - * In spite of these problems, failure here is not a shooting offense. - */ - int just_say_no = 1; - - if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no, - sizeof(int)) < 0) { - ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, - "setsockopt: (TCP_NODELAY)"); - } -} - -#else -#define sock_disable_nagle(s) /* NOOP */ -#endif - int ap_graceful_stop_signalled(void) { /* XXX - Does this really work? - Manoj */ @@ -437,7 +412,7 @@ return; } - sock_disable_nagle(csd); + ap_sock_disable_nagle(csd); iol = ap_iol_attach_socket(p, sock); conn_io = ap_bcreate(p, B_RDWR); ap_bpush_iol(conn_io, iol); 1.9 +1 -26 apache-2.0/src/modules/mpm/mpmt/mpmt.c Index: mpmt.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt/mpmt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mpmt.c 2000/07/10 21:37:17 1.8 +++ mpmt.c 2000/07/10 22:08:08 1.9 @@ -408,31 +408,6 @@ * Here follows a long bunch of generic server bookkeeping stuff... */ -#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(int s) -{ - /* The Nagle algorithm says that we should delay sending partial - * packets in hopes of getting more data. We don't want to do - * this; we are not telnet. There are bad interactions between - * persistent connections and Nagle's algorithm that have very severe - * performance penalties. (Failing to disable Nagle is not much of a - * problem with simple HTTP.) - * - * In spite of these problems, failure here is not a shooting offense. - */ - int just_say_no = 1; - - if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no, - sizeof(int)) < 0) { - ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, - "setsockopt: (TCP_NODELAY)"); - } -} - -#else -#define sock_disable_nagle(s) /* NOOP */ -#endif - int ap_graceful_stop_signalled(void) { /* XXX - Does this really work? - Manoj */ @@ -467,7 +442,7 @@ return; } - sock_disable_nagle(csd); + ap_sock_disable_nagle(csd); iol = ap_iol_attach_socket(p, sock); 1.106 +1 -26 apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c Index: mpmt_pthread.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- mpmt_pthread.c 2000/07/10 21:37:20 1.105 +++ mpmt_pthread.c 2000/07/10 22:08:10 1.106 @@ -377,31 +377,6 @@ * Here follows a long bunch of generic server bookkeeping stuff... */ -#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(int s) -{ - /* The Nagle algorithm says that we should delay sending partial - * packets in hopes of getting more data. We don't want to do - * this; we are not telnet. There are bad interactions between - * persistent connections and Nagle's algorithm that have very severe - * performance penalties. (Failing to disable Nagle is not much of a - * problem with simple HTTP.) - * - * In spite of these problems, failure here is not a shooting offense. - */ - int just_say_no = 1; - - if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no, - sizeof(int)) < 0) { - ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, - "setsockopt: (TCP_NODELAY)"); - } -} - -#else -#define sock_disable_nagle(s) /* NOOP */ -#endif - int ap_graceful_stop_signalled(void) { /* XXX - Does this really work? - Manoj */ @@ -432,7 +407,7 @@ return; } - sock_disable_nagle(csd); + ap_sock_disable_nagle(csd); iol = ap_iol_attach_socket(p, sock); 1.116 +1 -27 apache-2.0/src/modules/mpm/prefork/prefork.c Index: prefork.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -r1.115 -r1.116 --- prefork.c 2000/07/10 21:37:21 1.115 +++ prefork.c 2000/07/10 22:08:11 1.116 @@ -711,32 +711,6 @@ #endif } -#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(int s) -{ - /* The Nagle algorithm says that we should delay sending partial - * packets in hopes of getting more data. We don't want to do - * this; we are not telnet. There are bad interactions between - * persistent connections and Nagle's algorithm that have very severe - * performance penalties. (Failing to disable Nagle is not much of a - * problem with simple HTTP.) - * - * In spite of these problems, failure here is not a shooting offense. - */ - int just_say_no = 1; - - if (setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no, - sizeof(int)) < 0) { - ap_log_error(APLOG_MARK, APLOG_WARNING, errno, ap_server_conf, - "setsockopt: (TCP_NODELAY)"); - } -} - -#else -#define sock_disable_nagle(s) /* NOOP */ -#endif - - /***************************************************************** * Child process main loop. * The following vars are static to avoid getting clobbered by longjmp(); @@ -1037,7 +1011,7 @@ continue; #endif - sock_disable_nagle(sockdes); + ap_sock_disable_nagle(sockdes); iol = ap_iol_attach_socket(ptrans, csd); (void) ap_update_child_status(my_child_num, SERVER_BUSY_READ, 1.52 +1 -28 apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c Index: spmt_os2.c =================================================================== RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- spmt_os2.c 2000/07/10 21:37:23 1.51 +++ spmt_os2.c 2000/07/10 22:08:11 1.52 @@ -681,33 +681,6 @@ #endif } -#if defined(TCP_NODELAY) && !defined(MPE) && !defined(TPF) -static void sock_disable_nagle(ap_socket_t *s) -{ - /* The Nagle algorithm says that we should delay sending partial - * packets in hopes of getting more data. We don't want to do - * this; we are not telnet. There are bad interactions between - * persistent connections and Nagle's algorithm that have very severe - * performance penalties. (Failing to disable Nagle is not much of a - * problem with simple HTTP.) - * - * In spite of these problems, failure here is not a shooting offense. - */ - int just_say_no = 1; - ap_status_t status; - - status = ap_setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &just_say_no, sizeof(int)); - if (status != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_WARNING, status, server_conf, - "setsockopt: (TCP_NODELAY)"); - } -} - -#else -#define sock_disable_nagle(s) /* NOOP */ -#endif - - /***************************************************************** * Child process main loop. */ @@ -971,7 +944,7 @@ * socket options, file descriptors, and read/write buffers. */ - sock_disable_nagle(csd); + ap_sock_disable_nagle(csd); iol = ap_iol_attach_socket(ptrans, csd);