You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Doug MacEachern <do...@telebusiness.co.nz> on 1998/02/18 00:34:11 UTC

[PATCH] unbind cpu option for aix

Here's the "official" patch to comment, vote on, etc.

-Doug

--- http_main.c 1998/02/17 11:28:28 1.291
+++ http_main.c 1998/02/17 23:28:27
@@ -3312,6 +3312,19 @@
     }

     if (!pid) {
+#ifdef UNBIND_CPU
+#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)
+     fprintf(stderr,
+      "processor unbind failed %d\n", status);
+#endif
+#endif
  RAISE_SIGSTOP(MAKE_CHILD);
  MONCONTROL(1);
  /* Disable the restart signal handlers and enable the just_die stuff.



Re: [PATCH] unbind cpu option for aix

Posted by Dean Gaudet <dg...@arctic.org>.
AIX is completely broken.  No other SMP os I know of does this.  There is
processor affinity, but it's not so sticky as to live for the entire life
of the process.  Migration should occur by default... most kernels
eventually have primitives added to bind a process to a particular
processor, but by default things usually migrate.

Dean

On Wed, 18 Feb 1998, Doug MacEachern wrote:

> Dean Gaudet wrote:
> 
> > Why even make it an option?  How about we just try a beta release with it
> > enabled for all AIX boxes and see if it breaks anything.
> 
> Fine by me.   I haven't heard anyone say, if this is right thing to do or
> not.  How do other oses behave in terms of this cpu binding on a
> multi-processor box?
> 
> -Doug
> 
> 


Re: [PATCH] unbind cpu option for aix

Posted by Doug MacEachern <do...@telebusiness.co.nz>.
Dean Gaudet wrote:

> Why even make it an option?  How about we just try a beta release with it
> enabled for all AIX boxes and see if it breaks anything.

Fine by me.   I haven't heard anyone say, if this is right thing to do or
not.  How do other oses behave in terms of this cpu binding on a
multi-processor box?

-Doug


Re: [PATCH] unbind cpu option for aix

Posted by Dean Gaudet <dg...@arctic.org>.
Why even make it an option?  How about we just try a beta release with it
enabled for all AIX boxes and see if it breaks anything.

Dean

On Wed, 18 Feb 1998, Doug MacEachern wrote:

> Here's the "official" patch to comment, vote on, etc.
> 
> -Doug
> 
> --- http_main.c 1998/02/17 11:28:28 1.291
> +++ http_main.c 1998/02/17 23:28:27
> @@ -3312,6 +3312,19 @@
>      }
> 
>      if (!pid) {
> +#ifdef UNBIND_CPU
> +#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)
> +     fprintf(stderr,
> +      "processor unbind failed %d\n", status);
> +#endif
> +#endif
>   RAISE_SIGSTOP(MAKE_CHILD);
>   MONCONTROL(1);
>   /* Disable the restart signal handlers and enable the just_die stuff.
> 
> 
>