]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools: always evict oldest objects first in pool_evict_from_local_cache()
authorWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 11:40:14 +0000 (12:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 2 Jan 2022 11:40:14 +0000 (12:40 +0100)
commitd5ec100661f6b02e9e1b7e9fc14c7a2e7f2dcc8d
treea80471cb2d28f845b7ee526ad5932e28d9506780
parentf64504716843f69a9b10582b2d9cce6a7919795a
MINOR: pools: always evict oldest objects first in pool_evict_from_local_cache()

For an unknown reason, despite the comment stating that we were evicting
oldest objects first from the local caches, due to the use of LIST_NEXT,
the newest were evicted, since pool_put_to_cache() uses LIST_INSERT().

Some tests on 16 threads show that evicting oldest objects instead can
improve performance by 0.5-1% especially when using shared pools.
src/pool.c