httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <ad...@rowe-clan.net>
Subject Re: [PATCH] ap_mpm_query extension
Date Wed, 27 Jun 2001 03:33:37 GMT
+1, any objections before my next round of patching on Thursday?

----- Original Message ----- 
From: "Harrie Hazewinkel" <harrie@covalent.net>
To: "Apache Development" <new-httpd@apache.org>
Sent: Tuesday, June 26, 2001 6:13 PM
Subject: [PATCH] ap_mpm_query extension


> Hi,
> 
> Attached is a not applied patch that I already submitted a while ago.
> It extends the ap_mpm_query with more information that can be returned.
> 
> Harrie
> -- 
> address: Covalent Technologies, 645 Howard St, San Francisco, CA - 94105
> phone: +1-415-536-5221                               fax:+1-415-536-5210
> personal website: http://www.lisanza.net/


--------------------------------------------------------------------------------


> diff -ru ../httpd-2.0-orig/include/ap_mpm.h ./include/ap_mpm.h
> --- ../httpd-2.0-orig/include/ap_mpm.h Thu Apr 19 13:36:42 2001
> +++ ./include/ap_mpm.h Thu Apr 19 13:45:28 2001
> @@ -158,12 +158,18 @@
>                                        /* an MPM is using a dynamic #  */
>                                        /* threads or daemons.          */
>  
> -#define AP_MPMQ_MAX_DAEMONS        1  /* Max # of daemons     */
> -#define AP_MPMQ_IS_THREADED        2  /* MPM can do threading */
> -#define AP_MPMQ_IS_FORKED          3  /* MPM can do forking   */
> -#define AP_MPMQ_HARD_LIMIT_DAEMONS 4  /* The compiled max # deamons   */
> -#define AP_MPMQ_HARD_LIMIT_THREADS 5  /* The compiled max # threads   */
> -#define AP_MPMQ_MAX_THREADS        6  /* Max # of threads             */
> +#define AP_MPMQ_MAX_DAEMONS           1  /* Max # of daemons             */
> +#define AP_MPMQ_IS_THREADED           2  /* MPM can do threading         */
> +#define AP_MPMQ_IS_FORKED             3  /* MPM can do forking           */
> +#define AP_MPMQ_HARD_LIMIT_DAEMONS    4  /* The compiled max # deamons   */
> +#define AP_MPMQ_HARD_LIMIT_THREADS    5  /* The compiled max # threads   */
> +#define AP_MPMQ_MAX_THREADS           6  /* Max # of threads             */
> +#define AP_MPMQ_MIN_SPARE_DEAMONS     7  /* Min # of spare daemons       */
> +#define AP_MPMQ_MIN_SPARE_THREADS     8  /* Min # of spare threads       */
> +#define AP_MPMQ_MAX_SPARE_DAEMONS     9  /* Max # of spare daemons       */
> +#define AP_MPMQ_MAX_SPARE_THREADS    10  /* Max # of spare threads       */
> +#define AP_MPMQ_MAX_REQUESTS_DEAMON  11  /* Max # of requests per daemon */
> +
>  
>  /**
>   * Query a property of the current MPM.  
> diff -ru ../httpd-2.0-orig/server/mpm/beos/beos.c ./server/mpm/beos/beos.c
> --- ../httpd-2.0-orig/server/mpm/beos/beos.c Thu Apr 19 13:33:46 2001
> +++ ./server/mpm/beos/beos.c Thu Apr 19 13:48:31 2001
> @@ -671,6 +671,21 @@
>          case AP_MPMQ_MAX_THREADS:
>              *result = ap_threads_per_child;
>              return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_DEAMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_THREADS:    
> +            *result = max_spare_threads;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_DAEMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_THREADS:
> +            *result = min_spare_threads;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_REQUESTS_DEAMON:
> +            *result = ap_max_requests_per_child;
> +            return APR_SUCCESS;
>      }
>      return APR_ENOTIMPL;
>  }
> diff -ru ../httpd-2.0-orig/server/mpm/perchild/perchild.c ./server/mpm/perchild/perchild.c
> --- ../httpd-2.0-orig/server/mpm/perchild/perchild.c Thu Apr 19 13:33:50 2001
> +++ ./server/mpm/perchild/perchild.c Thu Apr 19 13:50:32 2001
> @@ -236,6 +236,21 @@
>          case AP_MPMQ_MAX_THREADS:
>              *result = max_threads;
>              return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_DEAMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_THREADS:    
> +            *result = min_spare_threads;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_DAEMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_THREADS:
> +            *result = max_spare_threads;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_REQUESTS_DEAMON:
> +            *result = max_requests_per_child;
> +            return APR_SUCCESS; 
>      }
>      return APR_ENOTIMPL;
>  }
> diff -ru ../httpd-2.0-orig/server/mpm/prefork/prefork.c ./server/mpm/prefork/prefork.c
> --- ../httpd-2.0-orig/server/mpm/prefork/prefork.c Thu Apr 19 13:33:49 2001
> +++ ./server/mpm/prefork/prefork.c Thu Apr 19 13:46:25 2001
> @@ -324,6 +324,21 @@
>          case AP_MPMQ_MAX_THREADS:
>              *result = 0;
>              return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_DEAMONS:
> +            *result = ap_daemons_min_free;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_THREADS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_DAEMONS:
> +            *result = ap_daemons_max_free;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_THREADS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_REQUESTS_DEAMON:
> +            *result = ap_max_requests_per_child;
> +            return APR_SUCCESS;
>      }
>      return APR_ENOTIMPL;
>  }
> diff -ru ../httpd-2.0-orig/server/mpm/spmt_os2/spmt_os2.c ./server/mpm/spmt_os2/spmt_os2.c
> --- ../httpd-2.0-orig/server/mpm/spmt_os2/spmt_os2.c Thu Apr 19 13:33:46 2001
> +++ ./server/mpm/spmt_os2/spmt_os2.c Thu Apr 19 13:53:31 2001
> @@ -899,6 +899,21 @@
>          case AP_MPMQ_MAX_THREADS:
>              *result = ap_threads_per_child;
>              return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_DEAMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_THREADS:    
> +            *result = ap_daemons_min_free;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_DAEMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_THREADS:
> +            *result = ap_daemons_max_free;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_REQUESTS_DEAMON:
> +            *result = ap_max_requests_per_child;
> +            return APR_SUCCESS; 
>      }
>      return APR_ENOTIMPL;
>  } 
> diff -ru ../httpd-2.0-orig/server/mpm/threaded/threaded.c ./server/mpm/threaded/threaded.c
> --- ../httpd-2.0-orig/server/mpm/threaded/threaded.c Thu Apr 19 13:33:47 2001
> +++ ./server/mpm/threaded/threaded.c Thu Apr 19 13:55:32 2001
> @@ -192,6 +192,21 @@
>          case AP_MPMQ_MAX_THREADS:
>              *result = ap_threads_per_child;
>              return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_DEAMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_THREADS:    
> +            *result = min_spare_threads;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_DAEMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_THREADS:
> +            *result = max_spare_threads;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_REQUESTS_DEAMON:
> +            *result = ap_max_requests_per_child;
> +            return APR_SUCCESS;
>      }
>      return APR_ENOTIMPL;
>  }
> diff -ru ../httpd-2.0-orig/server/mpm/winnt/mpm_winnt.c ./server/mpm/winnt/mpm_winnt.c
> --- ../httpd-2.0-orig/server/mpm/winnt/mpm_winnt.c Thu Apr 19 13:33:47 2001
> +++ ./server/mpm/winnt/mpm_winnt.c Thu Apr 19 13:57:32 2001
> @@ -1552,6 +1552,21 @@
>          case AP_MPMQ_MAX_THREADS:
>              *result = ap_threads_per_child;
>              return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_DEAMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MIN_SPARE_THREADS:    
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_DAEMONS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_SPARE_THREADS:
> +            *result = 0;
> +            return APR_SUCCESS;
> +        case AP_MPMQ_MAX_REQUESTS_DEAMON:
> +            *result = ap_max_requests_per_child;
> +            return APR_SUCCESS;
>      }
>      return APR_ENOTIMPL;
>  } 
> 


Mime
View raw message