From a8a0fe26b09bdb78e22d023bfb735c2964067b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= Date: Tue, 13 Jun 2017 19:33:31 +0100 Subject: [PATCH] Documentation updates --- doc/man/man5/lloadd.conf.5 | 8 ++++++++ servers/lloadd/upstream.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/doc/man/man5/lloadd.conf.5 b/doc/man/man5/lloadd.conf.5 index 4392d53f40..7b408c10c4 100644 --- a/doc/man/man5/lloadd.conf.5 +++ b/doc/man/man5/lloadd.conf.5 @@ -278,6 +278,14 @@ The default is 16; the minimum value is 2. Specify the number of work queues to use for the primary thread pool. The default is 1 and this is typically adequate for up to 8 CPU cores. The value should not exceed the number of CPUs in the system. +.TP +.B max_pdus_per_cycle +If set to 0, PDUs are handled by the I/O threads directly, otherwise +a task is queued to be picked up by the thread pool. This task will +process PDUs from the connection until there is no more data to be +read or this limit is reached when the I/O thread can pick it up again. +Very high values have a potential to cause some connections to be +starved in a very high-bandwidth environment. .SH TLS OPTIONS If diff --git a/servers/lloadd/upstream.c b/servers/lloadd/upstream.c index 9cc551da32..c632ab080f 100644 --- a/servers/lloadd/upstream.c +++ b/servers/lloadd/upstream.c @@ -311,6 +311,11 @@ handle_unsolicited( Connection *c, BerElement *ber ) * TODO: when the client already has data pending on write, we should mute the * upstream. * - should record the BerElement on the Op and the Op on the client + * + * The following hold on entering any of the handlers: + * - op->o_upstream_refcnt > 0 + * - op->o_upstream->c_refcnt > 0 + * - op->o_client->c_refcnt > 0 */ static int handle_one_response( Connection *c )