]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: pools: make pool_get_from_os() / pool_put_to_os() not update ->allocated
authorWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 09:07:48 +0000 (11:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 12 Aug 2023 17:04:34 +0000 (19:04 +0200)
commit29ad61fb00bafc3f1d845e914a6f4666a98bd445
treeb8d078c4f6ba3522e107ba80a9d27f70e5df367c
parentfeeda4132b5677e01e68eec6eab895a4806105a4
OPTIM: pools: make pool_get_from_os() / pool_put_to_os() not update ->allocated

The pool's allocation counter doesn't strictly require to be updated
from these functions, it may more efficiently be done in the caller
(even out of a loop for pool_flush() and pool_gc()), and doing so will
also help us spread the counters over an array later. The functions
were renamed _noinc and _nodec to make sure we catch any possible
user in an external patch. If needed, the original functions may easily
be reimplemented in an inline function.
include/haproxy/pool.h
src/pool.c