From e25e1dc44b57949f8c028dbc878bdeb6be9dcc7d Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Fri, 16 Feb 2001 19:00:24 +0000 Subject: [PATCH] Rename the mpmt_pthread module to threaded. This module has moved from the old mpmt_pthread directory to the new threaded directory. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88199 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 5 +++ docs/conf/highperformance-std.conf | 2 +- docs/conf/httpd-std.conf | 2 +- docs/manual/mod/index-bytype.html | 2 +- docs/manual/mod/index.html | 2 +- docs/manual/mod/mpm_common.html | 42 +++++++++---------- docs/manual/mod/prefork.html | 2 +- .../mod/{mpmt_pthread.html => threaded.html} | 8 ++-- docs/manual/mpm.html | 4 +- docs/manual/mpm.html.en | 4 +- modules/generators/config5.m4 | 2 +- server/mpm/MPM.NAMING | 2 +- server/mpm/config.m4 | 6 +-- server/mpm/mpmt_pthread/Makefile.in | 5 --- server/mpm/mpmt_pthread/Makefile.libdir | 4 -- server/mpm/threaded/Makefile.in | 5 +++ .../mpm/{mpmt_pthread => threaded}/config.m4 | 2 +- server/mpm/{mpmt_pthread => threaded}/mpm.h | 8 ++-- .../{mpmt_pthread => threaded}/mpm_default.h | 0 .../mpmt_pthread.c => threaded/threaded.c} | 14 +++---- 20 files changed, 61 insertions(+), 60 deletions(-) rename docs/manual/mod/{mpmt_pthread.html => threaded.html} (94%) delete mode 100644 server/mpm/mpmt_pthread/Makefile.in delete mode 100644 server/mpm/mpmt_pthread/Makefile.libdir create mode 100644 server/mpm/threaded/Makefile.in rename server/mpm/{mpmt_pthread => threaded}/config.m4 (77%) rename server/mpm/{mpmt_pthread => threaded}/mpm.h (96%) rename server/mpm/{mpmt_pthread => threaded}/mpm_default.h (100%) rename server/mpm/{mpmt_pthread/mpmt_pthread.c => threaded/threaded.c} (99%) diff --git a/CHANGES b/CHANGES index 5439e87d31..521d3bdae9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ Changes with Apache 2.0.12-dev + *) Rename mpmt_pthread to threaded. This is more in line with the + fact that mpmt_pthread shouldn't be using pthreads directly, and + it is a smaller name that doesn't tie into anything. + [Ryan Bloom] + *) Rename the module structures so that the exported symbol matches the file name, and it is easier to automate the installation process (generating LoadModule directives from the module filenames). diff --git a/docs/conf/highperformance-std.conf b/docs/conf/highperformance-std.conf index a97217b050..5254062f2b 100755 --- a/docs/conf/highperformance-std.conf +++ b/docs/conf/highperformance-std.conf @@ -26,7 +26,7 @@ MinSpareServers 5 MaxSpareServers 10 - + MaxClients 8 StartServers 1 MinSpareThreads 5 diff --git a/docs/conf/httpd-std.conf b/docs/conf/httpd-std.conf index 68c27b4224..ea9332e833 100644 --- a/docs/conf/httpd-std.conf +++ b/docs/conf/httpd-std.conf @@ -125,7 +125,7 @@ MaxRequestsPerChild 0 # MaxSpareThreads ...... maximum number of worker threads which are kept spare # ThreadsPerChild ...... constant number of worker threads in each server process # MaxRequestsPerChild .. maximum number of requests a server process serves - + StartServers 5 MaxClients 8 MinSpareThreads 5 diff --git a/docs/manual/mod/index-bytype.html b/docs/manual/mod/index-bytype.html index 3bf425823c..814654c6b7 100644 --- a/docs/manual/mod/index-bytype.html +++ b/docs/manual/mod/index-bytype.html @@ -28,7 +28,7 @@ directives.
Core
Core Apache features. -
mpmt_pthread +
threaded
Multi-Processing Module with Threading via Pthreads; Variable number of processes, constant number of threads/child
mpm_winnt diff --git a/docs/manual/mod/index.html b/docs/manual/mod/index.html index 509d412247..ee6ea73dd0 100644 --- a/docs/manual/mod/index.html +++ b/docs/manual/mod/index.html @@ -29,7 +29,7 @@ directives.
Core
Core Apache features. -
mpmt_pthread +
threaded
Multi-Processing Module with Threading via Pthreads; Variable number of processes, constant number of threads/child
mpm_winnt diff --git a/docs/manual/mod/mpm_common.html b/docs/manual/mod/mpm_common.html index 500e14c044..b3e634b913 100644 --- a/docs/manual/mod/mpm_common.html +++ b/docs/manual/mod/mpm_common.html @@ -94,7 +94,7 @@ connections. If this is off then mod_status will not work properly.

Module: mpmt_pthread, perchild, prefork, mpm_winnt

+>Module: threaded, perchild, prefork, mpm_winnt

This controls the directory to which Apache attempts to switch before dumping core. The default is in the


Module: mpmt_pthread, perchild, prefork

+>Module: threaded, perchild, prefork

The Group directive sets the group under which the server will answer requests. In order to use this directive, the stand-alone server must be run initially @@ -175,7 +175,7 @@ considerations.


Module: mpmt_pthread, perchild, prefork, mpm_winnt

+>Module: threaded, perchild, prefork, mpm_winnt

The PidFile directive sets the file to which the server records the process id of the daemon. If the filename does not begin with a slash @@ -210,7 +210,7 @@ Listen [IP-address:]port number
Module: mpmt_pthread, perchild, prefork, mpm_winnt

+>Module: threaded, perchild, prefork, mpm_winnt

The Listen directive instructs Apache to listen to only specific IP @@ -279,7 +279,7 @@ interfaces and port numbers, use Module: mpmt_pthread, perchild, prefork, mpm_winnt

+>Module: threaded, perchild, prefork, mpm_winnt

The maximum length of the queue of pending connections. Generally no tuning is needed or desired, however on some systems it is desirable @@ -312,7 +312,7 @@ use exactly what is specified as the backlog, but use a number based on Module: mpmt_pthread, perchild, prefork

+>Module: threaded, perchild, prefork

The LockFile directive sets the path to the lockfile used when Apache is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or @@ -352,7 +352,7 @@ server will try to create.

Module: mpmt_pthread, prefork

+>Module: threaded, prefork

The MaxClients directive sets the limit on the number of child processes that will be created to serve requests. When the server is @@ -394,7 +394,7 @@ href="#threadsperchild">ThreadsPerChild.

Module: mpmt_pthread, prefork, perchild, mpm_winnt

+>Module: threaded, prefork, perchild, mpm_winnt

The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child server process will handle. After MaxRequestsPerChild @@ -424,7 +424,7 @@ behavior to limit the number of connections per child. Default: MaxSpareThreads 10 (Perchild) or 500 (Mpmt_pthread)
+>Default: MaxSpareThreads 10 (Perchild) or 500 (threaded)
connections per child. Module: mpmt_pthread, perchild

+>Module: threaded, perchild

Maximum number of idle threads. Different MPMs deal with this directive differently. Perchild monitor the number of idle threads on a per-child basis. If there are too many idle threads in that child, the server will begin to kill threads within that child.

-

Mpmt_pthread deals with idle threads on a server-wide basis. If there are +

threaded deals with idle threads on a server-wide basis. If there are too many idle threads in the server then child processes are killed until the number of idle threads is less than this number.

@@ -471,7 +471,7 @@ until the number of idle threads is less than this number.

Module: mpmt_pthread, perchild

+>Module: threaded, perchild

Maximum number of threads per child. For MPMs with a variable number of threads per child, this directive sets the maximum number of @@ -491,7 +491,7 @@ the server.

Default: MaxSpareThreads 5 (Perchild) or 250 (Mpmt_pthread)
+>Default: MaxSpareThreads 5 (Perchild) or 250 (threaded)
Module: mpmt_pthread, perchild

+>Module: threaded, perchild

Minimum number of idle threads to handle request spikes. Different MPMs deal with this directive differently. Perchild monitor the number of idle threads on a per-child basis. If there aren't enough idle threads in that child, the server will begin to create new threads within that child.

-

Mpmt_pthread deals with idle threads on a server-wide basis. If there +

threaded deals with idle threads on a server-wide basis. If there aren't enough idle threads in the server then child processes are created until the number of idle threads is greater than number.

@@ -572,7 +572,7 @@ large enough to handle the requests for the entire site.

Module: mpmt_pthread, perchild, prefork

+>Module: threaded, perchild, prefork

The ScoreBoardFile directive is required on some architectures to place a file that the server will use to communicate between its children and @@ -610,7 +610,7 @@ about log file placement and Module: mpmt_pthread, perchild, prefork, mpm_winnt

+>Module: threaded, perchild, prefork, mpm_winnt

The server will set the TCP buffer size to the number of bytes specified. Very useful to increase past standard OS defaults on high @@ -640,7 +640,7 @@ fast pipes) Module: mpmt_pthread, prefork

+>Module: threaded, prefork

The StartServers directive sets the number of child server processes created on startup. As the number of processes is dynamically controlled depending @@ -698,13 +698,13 @@ reason to adjust this parameter.

Module: mpmt_pthread, mpm_winnt

+>Module: threaded, mpm_winnt

This directive sets the number of threads created by each child process. The child creates these threads at startup and never creates more. if using an MPM like mpmt_winnt, where there is only one child process, this number should be high enough to handle the entire load of the server. -If using an MPM like mpmt_pthread, where there are multiple child processes, +If using an MPM like threaded, where there are multiple child processes, the total number of threads should be high enough to handle the common load on the server.

@@ -732,7 +732,7 @@ on the server.

Module: mpmt_pthread, perchild, prefork

+>Module: threaded, perchild, prefork

The User directive sets the userid as which the server will answer requests. In order to use this directive, the standalone server must be run initially diff --git a/docs/manual/mod/prefork.html b/docs/manual/mod/prefork.html index 757b26f33f..26372a9ed5 100644 --- a/docs/manual/mod/prefork.html +++ b/docs/manual/mod/prefork.html @@ -1,7 +1,7 @@ -Apache MPM mpmt_pthread +Apache MPM prefork diff --git a/docs/manual/mod/mpmt_pthread.html b/docs/manual/mod/threaded.html similarity index 94% rename from docs/manual/mod/mpmt_pthread.html rename to docs/manual/mod/threaded.html index e84450f06d..0d00ff7cab 100644 --- a/docs/manual/mod/mpmt_pthread.html +++ b/docs/manual/mod/threaded.html @@ -1,7 +1,7 @@ -Apache MPM mpmt_pthread +Apache MPM threaded @@ -14,7 +14,7 @@ > -

Multi-Processing Module mpmt_pthread

+

Multi-Processing Module threaded

This Multi-Processing Module implements a hybrid multi-threaded multi-process web server. @@ -28,12 +28,12 @@ REL="Help" Source File: mpmt_pthread.c +>Source File: threaded.c
Module Identifier: mpm_mpmt_pthread_module +>Module Identifier: mpm_threaded_module

Summary

diff --git a/docs/manual/mpm.html b/docs/manual/mpm.html index 4d31d81383..6e9ada1650 100644 --- a/docs/manual/mpm.html +++ b/docs/manual/mpm.html @@ -46,7 +46,7 @@ MPMs.
  • The server can be better customized for the needs of the particular site. For example, sites that need a great deal of scalability can choose to use a threaded MPM like mpmt_pthread, while sites requiring +href="mod/threaded.html">threaded, while sites requiring stability or compatibility with older software can use a preforking MPM. In addition, special features like serving different hosts under different userids @@ -79,7 +79,7 @@ every module that is compiled into the server, including the MPM.

    • BeOS: mpmt_beos
    • OS/2: spmt_os2
    • -
    • Unix: mpmt_pthread
    • +
    • Unix: threaded
    • Windows: winnt
    diff --git a/docs/manual/mpm.html.en b/docs/manual/mpm.html.en index 4d31d81383..6e9ada1650 100644 --- a/docs/manual/mpm.html.en +++ b/docs/manual/mpm.html.en @@ -46,7 +46,7 @@ MPMs.
  • The server can be better customized for the needs of the particular site. For example, sites that need a great deal of scalability can choose to use a threaded MPM like mpmt_pthread, while sites requiring +href="mod/threaded.html">threaded, while sites requiring stability or compatibility with older software can use a preforking MPM. In addition, special features like serving different hosts under different userids @@ -79,7 +79,7 @@ every module that is compiled into the server, including the MPM.

    • BeOS: mpmt_beos
    • OS/2: spmt_os2
    • -
    • Unix: mpmt_pthread
    • +
    • Unix: threaded
    • Windows: winnt
    diff --git a/modules/generators/config5.m4 b/modules/generators/config5.m4 index 5e9f45ec13..2a1799f740 100644 --- a/modules/generators/config5.m4 +++ b/modules/generators/config5.m4 @@ -13,7 +13,7 @@ APACHE_MODULE(suexec, set uid and gid for spawned processes, , , no, [ LTFLAGS="$LTFLAGS -export-dynamic" -if test "$apache_cv_mpm" = "mpmt_pthread" -o "$apache_cv_mpm" = "dexter"; then +if test "$apache_cv_mpm" = "threaded" -o "$apache_cv_mpm" = "perchild"; then # if we are using a threaded MPM, we will get better performance with # mod_cgid, so make it the default. APACHE_MODULE(cgid, CGI scripts, , , yes) diff --git a/server/mpm/MPM.NAMING b/server/mpm/MPM.NAMING index 76164e9a75..2090692d44 100644 --- a/server/mpm/MPM.NAMING +++ b/server/mpm/MPM.NAMING @@ -27,7 +27,7 @@ The following MPMs currently exist: perchild ...... Multi Process Model with Threading via Pthreads Constant number of processes, variable number of threads each child process can have a different uid/gid. - mpmt_pthread .. Multi Process Model with Threading via Pthreads + threaded ...... Multi Process Model with Threading via Pthreads Variable number of processes, constant number of threads/child (= Apache/pthread) spmt_os2 ...... Single Process Model with Threading on OS/2 diff --git a/server/mpm/config.m4 b/server/mpm/config.m4 index 8e1c290269..1702e4b53a 100644 --- a/server/mpm/config.m4 +++ b/server/mpm/config.m4 @@ -1,18 +1,18 @@ AC_MSG_CHECKING(which MPM to use) AC_ARG_WITH(mpm, [ --with-mpm=MPM Choose the process model for Apache to use. - MPM={beos,mpmt_pthread,prefork,spmt_os2,perchild}],[ + MPM={beos,threaded,prefork,spmt_os2,perchild}],[ APACHE_MPM=$withval ],[ if test "x$APACHE_MPM" = "x"; then - APACHE_MPM=mpmt_pthread + APACHE_MPM=threaded fi ]) AC_MSG_RESULT($APACHE_MPM) apache_cv_mpm=$APACHE_MPM -if test "$apache_cv_mpm" = "mpmt_pthread" -o "$apache_cv_mpm" = "perchild"; then +if test "$apache_cv_mpm" = "threaded" -o "$apache_cv_mpm" = "perchild"; then PTHREADS_CHECK AC_MSG_CHECKING([for which threading library to use]) AC_MSG_RESULT($threads_result) diff --git a/server/mpm/mpmt_pthread/Makefile.in b/server/mpm/mpmt_pthread/Makefile.in deleted file mode 100644 index 77f54c37a9..0000000000 --- a/server/mpm/mpmt_pthread/Makefile.in +++ /dev/null @@ -1,5 +0,0 @@ - -LTLIBRARY_NAME = libmpmt_pthread.la -LTLIBRARY_SOURCES = mpmt_pthread.c - -include $(top_srcdir)/build/ltlib.mk diff --git a/server/mpm/mpmt_pthread/Makefile.libdir b/server/mpm/mpmt_pthread/Makefile.libdir deleted file mode 100644 index 7b5254013a..0000000000 --- a/server/mpm/mpmt_pthread/Makefile.libdir +++ /dev/null @@ -1,4 +0,0 @@ -This is a place-holder which indicates to Configure that it shouldn't -provide the default targets when building the Makefile in this directory. -Instead it'll just prepend all the important variable definitions, and -copy the Makefile.tmpl onto the end. diff --git a/server/mpm/threaded/Makefile.in b/server/mpm/threaded/Makefile.in new file mode 100644 index 0000000000..b5fb3691a6 --- /dev/null +++ b/server/mpm/threaded/Makefile.in @@ -0,0 +1,5 @@ + +LTLIBRARY_NAME = libthreaded.la +LTLIBRARY_SOURCES = threaded.c + +include $(top_srcdir)/build/ltlib.mk diff --git a/server/mpm/mpmt_pthread/config.m4 b/server/mpm/threaded/config.m4 similarity index 77% rename from server/mpm/mpmt_pthread/config.m4 rename to server/mpm/threaded/config.m4 index d91092ad87..9702aa2c81 100644 --- a/server/mpm/mpmt_pthread/config.m4 +++ b/server/mpm/threaded/config.m4 @@ -1,6 +1,6 @@ dnl ## XXX - Need a more thorough check of the proper flags to use -if test "$MPM_NAME" = "mpmt_pthread" ; then +if test "$MPM_NAME" = "threaded" ; then APACHE_FAST_OUTPUT(server/mpm/$MPM_NAME/Makefile) diff --git a/server/mpm/mpmt_pthread/mpm.h b/server/mpm/threaded/mpm.h similarity index 96% rename from server/mpm/mpmt_pthread/mpm.h rename to server/mpm/threaded/mpm.h index b8d82e3ac5..be4ada3ad4 100644 --- a/server/mpm/mpmt_pthread/mpm.h +++ b/server/mpm/threaded/mpm.h @@ -58,10 +58,10 @@ #include "scoreboard.h" #include "unixd.h" -#ifndef APACHE_MPM_MPMT_PTHREAD_H -#define APACHE_MPM_MPMT_PTHREAD_H +#ifndef APACHE_MPM_THREADED_H +#define APACHE_MPM_THREADED_H -#define MPMT_PTHREAD_MPM +#define THREADED_MPM #define MPM_NEEDS_RECLAIM_CHILD_PROCESSES 1 #define MPM_SYNC_CHILD_TABLE() (ap_sync_scoreboard_image()) @@ -75,4 +75,4 @@ extern unsigned int ap_my_pid; extern server_rec *ap_server_conf; extern char ap_coredump_dir[MAX_STRING_LEN]; -#endif /* APACHE_MPM_MPMT_PTHREAD_H */ +#endif /* APACHE_MPM_THREADED_H */ diff --git a/server/mpm/mpmt_pthread/mpm_default.h b/server/mpm/threaded/mpm_default.h similarity index 100% rename from server/mpm/mpmt_pthread/mpm_default.h rename to server/mpm/threaded/mpm_default.h diff --git a/server/mpm/mpmt_pthread/mpmt_pthread.c b/server/mpm/threaded/threaded.c similarity index 99% rename from server/mpm/mpmt_pthread/mpmt_pthread.c rename to server/mpm/threaded/threaded.c index 95369310b3..507d51ecfe 100644 --- a/server/mpm/mpmt_pthread/mpmt_pthread.c +++ b/server/mpm/threaded/threaded.c @@ -1155,7 +1155,7 @@ int ap_mpm_run(apr_pool_t *_pconf, apr_pool_t *plog, server_rec *s) return 0; } -static void mpmt_pthread_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) +static void threaded_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) { static int restart_num = 0; int no_detach = 0; @@ -1189,11 +1189,11 @@ static void mpmt_pthread_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_poo apr_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir)); } -static void mpmt_pthread_hooks(apr_pool_t *p) +static void threaded_hooks(apr_pool_t *p) { one_process = 0; - ap_hook_pre_config(mpmt_pthread_pre_config, NULL, NULL, APR_HOOK_MIDDLE); + ap_hook_pre_config(threaded_pre_config, NULL, NULL, APR_HOOK_MIDDLE); } @@ -1370,7 +1370,7 @@ static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, return NULL; } -static const command_rec mpmt_pthread_cmds[] = { +static const command_rec threaded_cmds[] = { UNIX_DAEMON_COMMANDS LISTEN_COMMANDS AP_INIT_TAKE1("PidFile", set_pidfile, NULL, RSRC_CONF, @@ -1396,14 +1396,14 @@ AP_INIT_TAKE1("CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, { NULL } }; -module AP_MODULE_DECLARE_DATA mpm_mpmt_pthread_module = { +module AP_MODULE_DECLARE_DATA mpm_threaded_module = { MPM20_MODULE_STUFF, NULL, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ - mpmt_pthread_cmds, /* command apr_table_t */ - mpmt_pthread_hooks /* register_hooks */ + threaded_cmds, /* command apr_table_t */ + threaded_hooks /* register_hooks */ }; -- 2.50.1