haproxy/include/haproxy
Willy Tarreau ed891fda52 MEDIUM: memory: make local pools independent on lockless pools
Till now the local pool caches were implemented only when lockless pools
were in use. This was mainly due to the difficulties to disentangle the
code parts. However the locked pools would further benefit from the local
cache, and having this would reduce the variants in the code.

This patch does just this. It adds a new debug macro DEBUG_NO_LOCAL_POOLS
to forcefully disable local pool caches, and makes sure that the high
level functions are now strictly the same between locked and lockless
(pool_alloc(), pool_alloc_dirty(), pool_free(), pool_get_first()). The
pool index calculation was moved inside the CONFIG_HAP_LOCAL_POOLS guards.
This allowed to move them out of the giant #ifdef and to significantly
reduce the code duplication.

A quick perf test shows that with locked pools the performance increases
by roughly 10% on 8 threads and gets closer to the lockless one.
2020-06-11 10:18:57 +02:00
..
api-t.h REORG: include: move the base files from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
api.h REORG: include: move the BUG_ON() code to haproxy/bug.h 2020-06-11 10:18:56 +02:00
atomic.h REORG: threads: extract atomic ops from hathreads.h 2020-06-11 10:18:56 +02:00
base64.h REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
buf-t.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
buf.h REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h 2020-06-11 10:18:56 +02:00
bug.h REORG: include: move the BUG_ON() code to haproxy/bug.h 2020-06-11 10:18:56 +02:00
compat.h REORG: include: move the base files from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
compiler.h REORG: include: move the base files from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
debug.h CLEANUP: debug: drop unused function p_malloc() 2020-06-11 10:18:56 +02:00
defaults.h REORG: include: move the base files from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
errors.h REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
freq_ctr-t.h REORG: include: move freq_ctr to haproxy/ 2020-06-11 10:18:56 +02:00
freq_ctr.h REORG: include: move freq_ctr to haproxy/ 2020-06-11 10:18:56 +02:00
hash.h REORG: include: move base64.h, errors.h and hash.h from common to to haproxy/ 2020-06-11 10:18:56 +02:00
initcall.h REORG: include: move the base files from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
intops.h REORG: include: move integer manipulation functions from standard.h to intops.h 2020-06-11 10:18:56 +02:00
istbuf.h REORG: include: move istbuf.h to haproxy/ 2020-06-11 10:18:56 +02:00
list-t.h REORG: include: split mini-clist into haproxy/list and list-t.h 2020-06-11 10:18:56 +02:00
list.h REORG: include: split hathreads into haproxy/thread.h and haproxy/thread-t.h 2020-06-11 10:18:56 +02:00
openssl-compat.h REORG: include: move openssl-compat.h from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
pool-os.h REORG: memory: move the OS-level allocator to haproxy/pool-os.h 2020-06-11 10:18:56 +02:00
pool-t.h MEDIUM: memory: make local pools independent on lockless pools 2020-06-11 10:18:57 +02:00
thread-t.h CLEANUP: thread: rename __decl_hathreads() to __decl_thread() 2020-06-11 10:18:56 +02:00
thread.h REORG: include: split hathreads into haproxy/thread.h and haproxy/thread-t.h 2020-06-11 10:18:56 +02:00
time.h REORG: include: move time.h from common/ to haproxy/ 2020-06-11 10:18:56 +02:00
version.h REORG: include: move version.h to haproxy/ 2020-06-11 10:18:56 +02:00