dougm 98/02/18 14:41:54
Modified: . STATUS src CHANGES src/main http_main.c Log: fix aix processor affinity Submitted by: Doug MacEachern Reviewed by: Dean, Jim, Martin Revision Changes Path 1.158 +0 -4 apache-1.3/STATUS Index: STATUS =================================================================== RCS file: /export/home/cvs/apache-1.3/STATUS,v retrieving revision 1.157 retrieving revision 1.158 diff -u -r1.157 -r1.158 --- STATUS 1998/02/18 20:39:19 1.157 +++ STATUS 1998/02/18 22:41:49 1.158 @@ -38,10 +38,6 @@ <[EMAIL PROTECTED]> Status: Ralf +1, Martin +1 - * Doug's [PATCH] unbind cpu option for aix - <[EMAIL PROTECTED]> - Status: Doug +1, Jim +1, Martin +1 - Concepts: * Dean's [PRE-PATCH] expanding ap_snprintf() 1.639 +5 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.638 retrieving revision 1.639 diff -u -r1.638 -r1.639 --- CHANGES 1998/02/18 20:52:51 1.638 +++ CHANGES 1998/02/18 22:41:50 1.639 @@ -1,5 +1,10 @@ Changes with Apache 1.3b6 + *) By default AIX binds a process (and it's children) to a single + processor. httpd children now unbind themselves from that cpu + and re-bind to one selected at random via bindprocessor() + [Doug MacEachern] + *) Linux 2.0 and above implement RLIMIT_AS, RLIMIT_DATA has almost no effect. Work around it by using RLIMIT_AS for the RLimitMEM directive. [Enrik Berkhan <[EMAIL PROTECTED]>] PR#1816 1.292 +12 -0 apache-1.3/src/main/http_main.c Index: http_main.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v retrieving revision 1.291 retrieving revision 1.292 diff -u -r1.291 -r1.292 --- http_main.c 1998/02/17 11:28:28 1.291 +++ http_main.c 1998/02/18 22:41:53 1.292 @@ -3312,6 +3312,18 @@ } if (!pid) { +#ifdef AIX +/* by default AIX binds to a single processor + * this bit unbinds children which will then bind to another cpu + */ +#include <sys/processor.h> + int status = bindprocessor(BINDPROCESS, (int)getpid(), + PROCESSOR_CLASS_ANY); + if (status != OK) { + aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, server_conf, + "processor unbind failed %d\n", status); + } +#endif RAISE_SIGSTOP(MAKE_CHILD); MONCONTROL(1); /* Disable the restart signal handlers and enable the just_die stuff.