]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pool: allocate from the shared cache through the local caches
authorWilly Tarreau <w@1wt.eu>
Thu, 30 Dec 2021 16:09:31 +0000 (17:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 18:27:57 +0000 (19:27 +0100)
commitafe2c4a1fc1c777e645944f69a4de63e9e156f38
treede3e0982ab703df2e40264824300646201d3ade5
parent8c4927098e994e26441db64e77eba11b9757b915
MINOR: pool: allocate from the shared cache through the local caches

One of the thread scaling challenges nowadays for the pools is the
contention on the shared caches. There's never any situation where we
have a shared cache and no local cache anymore, so we can technically
afford to transfer objects from the shared cache to the local cache
before returning them to the user via the regular path. This adds a
little bit more work per object per miss, but will permit batch
processing later.

This patch simply moves pool_get_from_shared_cache() to pool.c under
the new name pool_refill_local_from_shared(), and this function does
not return anything but it places the allocated object at the head of
the local cache.
include/haproxy/pool.h
src/pool.c