]> granicus.if.org Git - apache/commitdiff
On the trunk:
authorStefan Eissing <icing@apache.org>
Wed, 29 Nov 2017 09:49:19 +0000 (09:49 +0000)
committerStefan Eissing <icing@apache.org>
Wed, 29 Nov 2017 09:49:19 +0000 (09:49 +0000)
mod_http2: fixed unfair scheduling when number of active connections
     exceeded the scheduling fifo capacity.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1816619 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http2/h2_workers.c

diff --git a/CHANGES b/CHANGES
index 98332266c0519f455040fc4bc1924bf3504b46b0..8e99fecf1e0271f48d82a82f1ffbd749adb9ac89 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_http2: fixed unfair scheduling when number of active connections
+     exceeded the scheduling fifo capacity. [Stefan Eissing]
+
   *) core: Support zone/scope in IPv6 link-local addresses in Listen and
      VirtualHost directives (requires APR 1.7.x or later).  PR 59396.  [Joe Orton]
 
index 12762506440a7743c26077ae1c989bf3ced0be10..e976df94cf6996f9b370c625570c475871a2334a 100644 (file)
@@ -305,7 +305,18 @@ h2_workers *h2_workers_create(server_rec *s, apr_pool_t *server_pool,
     workers->max_workers = max_workers;
     workers->max_idle_secs = (idle_secs > 0)? idle_secs : 10;
 
-    status = h2_fifo_create(&workers->mplxs, pool, 2 * workers->max_workers);
+    /* FIXME: the fifo set we use here has limited capacity. Once the
+     * set is full, connections with new requests do a wait. Unfortunately,
+     * we have optimizations in place there that makes such waiting "unfair"
+     * in the sense that it may take connections a looong time to get scheduled.
+     *
+     * Need to rewrite this to use one of our double-linked lists and a mutex
+     * to have unlimited capacity and fair scheduling.
+     *
+     * For now, we just make enough room to have many connections inside one
+     * process.
+     */
+    status = h2_fifo_set_create(&workers->mplxs, pool, 8 * 1024);
     if (status != APR_SUCCESS) {
         return NULL;
     }