]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pools: make the global pools a runtime option.
authorWilly Tarreau <w@1wt.eu>
Tue, 22 Feb 2022 08:21:13 +0000 (09:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Feb 2022 16:11:33 +0000 (17:11 +0100)
commitdff3b0627d7d26b99411b8e302bbb03968060acf
tree97e1cd4e6401c2e946fd99b85aae0b272f4ffdad
parent6f3c7f6e6a23c8c4385b1f844f22ff6ff2d5c0c8
MINOR: pools: make the global pools a runtime option.

There were very few functions left that were specific to global pools,
and even the checks they used to participate to are not directly on the
most critical path so they can suffer an extra "if".

What's done now is that pool_releasable() always returns 0 when global
pools are disabled (like the one before) so that pool_evict_last_items()
never tries to place evicted objects there. As such there will never be
any object in the free list. However pool_refill_local_from_shared() is
bypassed when global pools are disabled so that we even avoid the atomic
loads from this function.

The default global setting is still adjusted based on the original
CONFIG_NO_GLOBAL_POOLS that is set depending on threads and the allocator.
The global executable only grew by 1.1kB by keeping this code enabled,
and the code is simplified and will later support runtime options.
include/haproxy/pool-t.h
include/haproxy/pool.h
src/pool.c