httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r730873 - in /httpd/httpd/trunk/server/mpm/simple: simple_api.c simple_core.c simple_types.h
Date Sat, 03 Jan 2009 00:03:49 GMT
Author: rjung
Date: Fri Jan  2 16:03:48 2009
New Revision: 730873

URL: http://svn.apache.org/viewvc?rev=730873&view=rev
Log:
Clean up thread and process number defaults
for simple mpm.

- Before, simple wouldn't start without explicit
  config, because default numbers were 0
- log messages "more" and "less" were misleading

Modified:
    httpd/httpd/trunk/server/mpm/simple/simple_api.c
    httpd/httpd/trunk/server/mpm/simple/simple_core.c
    httpd/httpd/trunk/server/mpm/simple/simple_types.h

Modified: httpd/httpd/trunk/server/mpm/simple/simple_api.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_api.c?rev=730873&r1=730872&r2=730873&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_api.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_api.c Fri Jan  2 16:03:48 2009
@@ -185,12 +185,6 @@
     ap_mpm_rewrite_args(process);
 }
 
-#define SIMPLE_MAX_PROC (500000)
-#define SIMPLE_MIN_PROC (1)
-
-#define SIMPLE_MAX_THREADS (500000)
-#define SIMPLE_MIN_THREADS (1)
-
 static int
 simple_check_config(apr_pool_t * p, apr_pool_t * plog,
                     apr_pool_t * ptemp, server_rec * s)
@@ -199,28 +193,28 @@
 
     if (sc->procmgr.proc_count > SIMPLE_MAX_PROC) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
-                     "simple_check_config: SimpleProcCount must be less than %d",
+                     "simple_check_config: SimpleProcCount must be at most %d",
                      SIMPLE_MAX_PROC);
         return !OK;
     }
 
     if (sc->procmgr.proc_count < SIMPLE_MIN_PROC) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
-                     "simple_check_config: SimpleProcCount must be more than %d",
+                     "simple_check_config: SimpleProcCount must be at least %d",
                      SIMPLE_MIN_PROC);
         return !OK;
     }
 
     if (sc->procmgr.thread_count > SIMPLE_MAX_THREADS) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
-                     "simple_check_config: SimpleThreadCount must be less than %d",
+                     "simple_check_config: SimpleThreadCount must be at most %d",
                      SIMPLE_MAX_THREADS);
         return !OK;
     }
 
     if (sc->procmgr.thread_count < SIMPLE_MIN_THREADS) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
-                     "simple_check_config: SimpleThreadCount must be more than %d",
+                     "simple_check_config: SimpleThreadCount must be at least %d",
                      SIMPLE_MIN_THREADS);
         return !OK;
     }

Modified: httpd/httpd/trunk/server/mpm/simple/simple_core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_core.c?rev=730873&r1=730872&r2=730873&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_core.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_core.c Fri Jan  2 16:03:48 2009
@@ -46,6 +46,8 @@
     apr_pool_tag(sc->pool, "simple-mpm-core");
 
     sc->mpm_state = AP_MPMQ_STARTING;
+    sc->procmgr.proc_count = SIMPLE_DEF_PROC;
+    sc->procmgr.thread_count = SIMPLE_DEF_THREADS;
     sc->procmgr.max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD;
 
     sc->children = apr_hash_make(sc->pool);

Modified: httpd/httpd/trunk/server/mpm/simple/simple_types.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_types.h?rev=730873&r1=730872&r2=730873&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_types.h (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_types.h Fri Jan  2 16:03:48 2009
@@ -35,6 +35,13 @@
     int max_requests_per_child;
 } simple_proc_mgr_t;
 
+#define SIMPLE_MAX_PROC (500000)
+#define SIMPLE_DEF_PROC (5)
+#define SIMPLE_MIN_PROC (1)
+#define SIMPLE_MAX_THREADS (500000)
+#define SIMPLE_DEF_THREADS (5)
+#define SIMPLE_MIN_THREADS (1)
+
 typedef void (*simple_timer_cb) (simple_core_t * sc, void *baton);
 typedef void (*simple_io_sock_cb) (simple_core_t * sc, apr_socket_t * sock,
                                    int flags, void *baton);



Mime
View raw message