]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: dynbuf: refrain from offering a buffer if more critical ones are waiting
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2024 16:14:06 +0000 (18:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 May 2024 15:18:13 +0000 (17:18 +0200)
commitd1eb48a12b466984532c10091e04f4da64eaa9cd
tree2baa21ef1889eb9117e620a8e5892c8520428252
parenta160b3c50cd2eceb0dbb8e6a1f06d09e9b07b625
MEDIUM: dynbuf: refrain from offering a buffer if more critical ones are waiting

Now b_alloc() will check the queues at the same and higher criticality
levels before allocating a buffer, and will refrain from allocating one
if these are not empty. The purpose is to put some priorities in the
allocation order so that most critical allocators are offered a chance
to complete.

However in order to permit a freshly dequeued task to allocate again while
siblings are still in the queue, there is a special DB_F_NOQUEUE flag to
pass to b_alloc() that will take care of this special situation.
include/haproxy/dynbuf-t.h
include/haproxy/dynbuf.h