summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2024-06-21 11:48:12 +0200
committerYann Ylavic <ylavic@apache.org>2024-06-21 11:48:12 +0200
commit67c65983d5360c662a44af180181ece5f5bd628e (patch)
tree370e2431fbcbaeac8f31b7d40f43b79e521b1a00 /include
parentmod_proxy: Follow up to r1918438: Don't cleanup conn before running the addre... (diff)
downloadapache2-67c65983d5360c662a44af180181ece5f5bd628e.tar.xz
apache2-67c65983d5360c662a44af180181ece5f5bd628e.zip
mpm_event,mod_http2,mod_status: Follow up to r1918257: CONN_STATE_ASYNC_WAITIO.
Per discussion on PR #449, have a separate state for returning the connection to the MPM to wait for an IO (namely CONN_STATE_ASYNC_WAITIO), rather than (ab)using CONN_STATE_PROCESSING. This removes the need for AGAIN added in r1918257 (for now), and AP_MPMQ_CAN_AGAIN is renamed to AP_MPMQ_CAN_WAITIO. This is also the state that mod_status accounts for, so rename ->processing to ->wait_io in process_score (shows as "wait-io" in mod_status and mod_lua). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1918482 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h7
-rw-r--r--include/ap_mpm.h4
-rw-r--r--include/httpd.h14
-rw-r--r--include/scoreboard.h3
4 files changed, 13 insertions, 15 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index fcf98e8908..3bc51334e7 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -723,9 +723,10 @@
* 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_PROCESSING
- * 20211221.21 (2.5.1-dev) Add processing field struct process_score
- * 20211221.22 (2.5.1-dev) Add AGAIN, AP_MPMQ_CAN_AGAIN.
+ * 20211221.20 (2.5.1-dev) Add CONN_STATE_ASYNC_WAITIO, CONN_STATE_KEEPALIVE
+ * and CONN_STATE_PROCESSING
+ * 20211221.21 (2.5.1-dev) Add wait_io field to struct process_score
+ * 20211221.22 (2.5.1-dev) Add AP_MPMQ_CAN_WAITIO
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
diff --git a/include/ap_mpm.h b/include/ap_mpm.h
index 82075a4488..f2fd436d50 100644
--- a/include/ap_mpm.h
+++ b/include/ap_mpm.h
@@ -182,8 +182,8 @@ AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
#define AP_MPMQ_CAN_SUSPEND 17
/** MPM supports additional pollfds */
#define AP_MPMQ_CAN_POLL 18
-/** MPM reacts to AGAIN response */
-#define AP_MPMQ_CAN_AGAIN 19
+/** MPM supports CONN_STATE_ASYNC_WAITIO */
+#define AP_MPMQ_CAN_WAITIO 19
/** @} */
/**
diff --git a/include/httpd.h b/include/httpd.h
index 99a3cf31a7..9782a8ad82 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -465,9 +465,6 @@ AP_DECLARE(const char *) ap_get_server_built(void);
*/
#define SUSPENDED -3 /**< Module will handle the remainder of the request.
* The core will never invoke the request again */
-#define AGAIN -4 /**< Module wants to be called again when more
- * data is available.
- */
/** Returned by the bottom-most filter if no data was written.
* @see ap_pass_brigade(). */
@@ -1322,11 +1319,7 @@ struct conn_slave_rec {
*/
typedef enum {
CONN_STATE_KEEPALIVE, /* Kept alive in the MPM (using KeepAliveTimeout) */
- CONN_STATE_PROCESSING, /* Processed by process_connection() hooks, returning
- * AGAIN to the MPM in this state will make it wait for
- * the connection to be readable or writable according to
- * CONN_SENSE_WANT_READ or CONN_SENSE_WANT_WRITE respectively,
- * where Timeout applies */
+ CONN_STATE_PROCESSING, /* Processed by process_connection hooks */
CONN_STATE_HANDLER, /* Processed by the modules handlers */
CONN_STATE_WRITE_COMPLETION, /* Flushed by the MPM before entering CONN_STATE_KEEPALIVE */
CONN_STATE_SUSPENDED, /* Suspended in the MPM until ap_run_resume_suspended() */
@@ -1334,6 +1327,11 @@ typedef enum {
CONN_STATE_LINGER_NORMAL, /* MPM has started lingering close with normal timeout */
CONN_STATE_LINGER_SHORT, /* MPM has started lingering close with short timeout */
+ CONN_STATE_ASYNC_WAITIO, /* Returning this state to the MPM will make it wait for
+ * the connection to be readable or writable according to
+ * c->cs->sense (resp. CONN_SENSE_WANT_READ or _WRITE),
+ * using the configured Timeout */
+
CONN_STATE_NUM, /* Number of states (keep here before aliases) */
/* Aliases (legacy) */
diff --git a/include/scoreboard.h b/include/scoreboard.h
index d604b875df..25d19f0353 100644
--- a/include/scoreboard.h
+++ b/include/scoreboard.h
@@ -148,8 +148,7 @@ struct process_score {
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) */
+ apr_uint32_t wait_io; /* async connections waiting an IO in the MPM */
};
/* Scoreboard is now in 'local' memory, since it isn't updated once created,