]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: dynbuf: make the buffer_wq an array of list heads
authorWilly Tarreau <w@1wt.eu>
Mon, 22 Apr 2024 16:39:06 +0000 (18:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 10 May 2024 15:18:13 +0000 (17:18 +0200)
commita5d6a7998669bffdc5c4138f5dfbc4a25e119ca3
treed331479452e3487fb6c15fcecdd01f04d5ac06f2
parenta214197ce73929be0900e42385dd010e1905b0b0
MEDIUM: dynbuf: make the buffer_wq an array of list heads

Let's turn the buffer_wq into an array of 4 list heads. These are chosen
by criticality. The DB_CRIT_TO_QUEUE() macro maps each criticality level
into one of these 4 queues. The goal here clearly is to make it possible
to wake up the most critical queues in priority in order to let some tasks
finish their job and release buffers that others can use.

In order to avoid having to look up all queues, a bit map indicates which
queues are in use, which also allows to avoid looping in the most common
case where queues are empty..
include/haproxy/dynbuf-t.h
include/haproxy/dynbuf.h
include/haproxy/tinfo-t.h
src/dynbuf.c