From: Stefan Eissing Date: Wed, 29 Nov 2017 09:49:19 +0000 (+0000) Subject: On the trunk: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18eaeae9c3f0697775bc0aad3566e9f051070112;p=apache On the trunk: 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 --- diff --git a/CHANGES b/CHANGES index 98332266c0..8e99fecf1e 100644 --- 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] diff --git a/modules/http2/h2_workers.c b/modules/http2/h2_workers.c index 1276250644..e976df94cf 100644 --- a/modules/http2/h2_workers.c +++ b/modules/http2/h2_workers.c @@ -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; }