]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: pool: compute the number of evictable entries once per pool
authorWilly Tarreau <w@1wt.eu>
Sat, 1 Jan 2022 23:27:06 +0000 (00:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 18:35:26 +0000 (19:35 +0100)
commit361e31e3fecb41443425d4f2e6ed00ccf50a3d18
tree56a92d30f9962ea05d7a9ead97e90084460c8239
parent91a8e28f90e4b31cd15ac8e6a6e700ff73decbf0
MEDIUM: pool: compute the number of evictable entries once per pool

In pool_evict_from_local_cache() we used to check for room left in the
pool for each and every object. Now we compute the value before entering
the loop and keep into a local list what has to be released, and call
the OS-specific functions for the other ones.

It should already save some cycles since it's not needed anymore to
recheck for the pool's filling status. But the main expected benefit
comes from the ability to pre-construct a list of all releasable
objects, that will later help with grouping them.
src/pool.c