]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: mux-h2: permit a stream to allocate as many buffers as desired
authorWilly Tarreau <w@1wt.eu>
Thu, 3 Oct 2024 14:09:18 +0000 (16:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Oct 2024 14:29:16 +0000 (16:29 +0200)
commit3816c38601fc32a26570143e72d7e4fd50d6468b
tree4a9d90851bb17ede6d6b69940e1dbbecd675eeae
parent4eb3ff1d3baf307f66afba6921e20ff703ef4cc4
MAJOR: mux-h2: permit a stream to allocate as many buffers as desired

Now we don't enforce allocation limits in h2s_get_rxbuf(), since there
is no benefit in not processing pending data, it would still cause HoL
for no saving. The only reason for not allocating is if there are no
buffers available for the connection.

In theory this should not change anything except that it excerts code
paths that support reallocating multiple buffers, which could possibly
uncover a sleeping bug. This is why it's placed in a separate commit.

And one observation worth noting is that it almost cut in half the number
of iocb wakeups: for 1000 1MB transfers over 100 concurrent streams of a
single connection, we used to observe 208k wakeups (110 from restart_reading,
80 from snd_buf, 11 from done_ff), and now we're observing 128k (113 from
restart_reading, 2.4 from snd_buf, 6.9k from done_ff), which seems to
indicate that pretty often the demuxing was blocked on a buffer full due
to the default advertised window of 64k.
src/mux_h2.c