]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pool: add a function to estimate how many may be released at once
authorWilly Tarreau <w@1wt.eu>
Sat, 1 Jan 2022 23:21:46 +0000 (00:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 18:35:26 +0000 (19:35 +0100)
commit91a8e28f90e4b31cd15ac8e6a6e700ff73decbf0
treed49a3c8ec32c01e3881a637a4e112a64f8797e19
parentc16ed3b090df1d8452d4dea85400d9100f89e712
MINOR: pool: add a function to estimate how many may be released at once

At the moment we count the number of releasable objects to a shared pool
one by one. The way the formula is made allows to pre-compute the number
of available slots, so let's add a function for that so that callers can
do it once before iterating.

This takes into account the average number of entries needed and the
minimum availability per pool. The function is not used yet.
include/haproxy/pool.h