]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: dynbuf/stream: do not allocate the buffers in the callback
authorWilly Tarreau <w@1wt.eu>
Mon, 29 Apr 2024 06:52:40 +0000 (08:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 May 2024 15:18:13 +0000 (17:18 +0200)
commit9a27d7aa6f680f7836abaded2108b8f3bec8b30b
treed7601566d9a4d37472f39d079b0359deafef371f
parentdb21062881686ab04ee32e1af197f25e72719d69
MEDIUM: dynbuf/stream: do not allocate the buffers in the callback

One of the problematic designs with the buffer_wait mechanism is that
the callbacks pre-allocate the buffers and stay in the run queue for
a while, resulting in all of the few buffers being assigned to waiting
tasks instead of being all available to one task that needs them all at
once.

Here we simply stop doing this, the callback clears the waiting flags
and wakes the task up so that it has a chance of still finding some
buffers.
src/stream.c