summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2024-06-01 17:08:46 +0200
committerYann Ylavic <ylavic@apache.org>2024-06-01 17:08:46 +0200
commitd821182d76394cb38d5c80d447a66c1be23dc46c (patch)
treefd4fd17cf51c9011b7041ebf9643f82efae8fdde /include
parentmpm_event: Don't spam with "Stopping process due to MaxConnectionsPerChild" (diff)
downloadapache2-d821182d76394cb38d5c80d447a66c1be23dc46c.tar.xz
apache2-d821182d76394cb38d5c80d447a66c1be23dc46c.zip
mpm_event, mod_status: Separate processing and write completion queues.
As a follow up to r1918022 which handled the new CONN_STATE_PROCESS(ing) and existing CONN_STATE_WRITE_COMPLETION in the same async queue, let's now have two separates ones which allows more relevant async accounting in mod_status. Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING as it's how it will be called in mod_status. * include/ap_mmn.h: MMN minor bump for process_score->processing counter. * include/httpd.h: Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING. * include/scoreboard.h: Add process_score->processing field. * include/httpd.h, modules/http/http_core.c, modules/http2/h2_c1.c, server/mpm/event/event.c, server/mpm/motorz/motorz.c, server/mpm/simple/simple_io.c: Rename CONN_STATE_PROCESS to CONN_STATE_PROCESSING. * server/mpm/event/event.c: Restore write_completion_q to handle connections in CONN_STATE_WRITE_COMPLETION. Use processing_q (renamed from process_q) solely for CONN_STATE_PROCESSING. Update process_score->processing according to the length of processing_q. * modules/generators/mod_status.c: Show the value of process_score->processing in the stats. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918098 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/httpd.h4
-rw-r--r--include/scoreboard.h4
3 files changed, 7 insertions, 4 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 06c04bd50e..9c83bbb5a8 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -723,7 +723,8 @@
* 20211221.17 (2.5.1-dev) Add ap_proxy_worker_get_name()
* 20211221.18 (2.5.1-dev) Add ap_regexec_ex()
* 20211221.19 (2.5.1-dev) Add AP_REG_NOTEMPTY_ATSTART
- * 20211221.20 (2.5.1-dev) Add CONN_STATE_KEEPALIVE and CONN_STATE_PROCESS
+ * 20211221.20 (2.5.1-dev) Add CONN_STATE_KEEPALIVE and CONN_STATE_PROCESSING
+ * 20211221.21 (2.5.1-dev) Add processing field struct process_score
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
diff --git a/include/httpd.h b/include/httpd.h
index c547c30ea4..f2e3795f5a 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -1319,7 +1319,7 @@ struct conn_slave_rec {
*/
typedef enum {
CONN_STATE_KEEPALIVE, /* Kept alive in the MPM (using KeepAliveTimeout) */
- CONN_STATE_PROCESS, /* Handled by process_connection() hooks, may be returned
+ CONN_STATE_PROCESSING, /* Handled by process_connection() hooks, may be returned
to the MPM for POLLIN/POLLOUT (using Timeout) */
CONN_STATE_HANDLER, /* Processed by the modules handlers */
CONN_STATE_WRITE_COMPLETION, /* Flushed by the MPM before entering CONN_STATE_KEEPALIVE */
@@ -1332,7 +1332,7 @@ typedef enum {
/* Aliases (legacy) */
CONN_STATE_CHECK_REQUEST_LINE_READABLE = CONN_STATE_KEEPALIVE,
- CONN_STATE_READ_REQUEST_LINE = CONN_STATE_PROCESS,
+ CONN_STATE_READ_REQUEST_LINE = CONN_STATE_PROCESSING,
} conn_state_e;
typedef enum {
diff --git a/include/scoreboard.h b/include/scoreboard.h
index 7542999b83..d604b875df 100644
--- a/include/scoreboard.h
+++ b/include/scoreboard.h
@@ -144,10 +144,12 @@ struct process_score {
* connections (for async MPMs)
*/
apr_uint32_t connections; /* total connections (for async MPMs) */
- apr_uint32_t write_completion; /* async connections in write completion or POLLIN/POLLOUT */
+ apr_uint32_t write_completion; /* async connections in write completion */
apr_uint32_t lingering_close; /* async connections in lingering close */
apr_uint32_t keep_alive; /* async connections in keep alive */
apr_uint32_t suspended; /* connections suspended by some module */
+ apr_uint32_t processing; /* async connections in processing (returned
+ to the MPM for POLLIN/POLLOUT) */
};
/* Scoreboard is now in 'local' memory, since it isn't updated once created,