httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <>
Subject aix + bindprocessor()
Date Tue, 17 Feb 1998 04:31:47 GMT
There are some folks who seem to think apache and all it's children are
binding to the same processor on an aix box with 4 cpu's.  After reading
the the aix bindprocessor manpage, dropping this bit in http_main.c
should unbind the child from the current cpu and randomly select
another.  Anyone know if there is any truth to this?   Or how to find
out?  The tools to find out what cpu a process is bound to ps,
bindprocessor  (command line tool), of course, don't work on this box.


--- src/main/http_main.c.orig   Mon Nov 17 04:43:16 1997
+++ src/main/http_main.c        Tue Feb 17 17:24:22 1998
@@ -3062,6 +3062,14 @@

     if (!pid) {
+#ifdef AIX
+#include <sys/processor.h>
+       int status = bindprocessor(BINDPROCESS, (int)getpid(),
+                                  PROCESSOR_CLASS_ANY);
+       if(status != OK)
+           fprintf(stderr,
+                   "processor unbind failed %d\n", status);
        /* Disable the restart signal handlers and enable the just_die
         * Note that since restart() just notes that a restart has been

View raw message