]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: threads: move declaration of capabilities to config.h
authorWilly Tarreau <w@1wt.eu>
Wed, 10 Oct 2018 16:29:23 +0000 (18:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 10 Oct 2018 16:29:23 +0000 (18:29 +0200)
commit2325d8af93ae2f044432b903a25e702f17cedff3
tree36c48d60746f9bbc42ec00767cc31587844d1d17
parent7ad43e7928c9a61b40332e4d5e9a7ccc33e6b65b
BUG/MINOR: threads: move declaration of capabilities to config.h

In commit f161d0f51 ("BUG/MINOR: pools/threads: don't ignore DEBUG_UAF
on double-word CAS capable archs") I moved some defines and accidently
messed up with lockfree pools. The problem is that the HA_HAVE_CAS_DW
macro is not defined anymore where the CONFIG_HAP_LOCKLESS_POOLS macro
is set, so this fix implicitly disabled lockfree pools.

This patch fixes this by moving the capabilities definition to config.h
(probably that we'd benefit from having an "arch.h" file to declare the
capabilities offered by the architecture). In a test on a 12-core machine,
we used to measure 19s spent in the pool lock for 1M requests without
this patch, and 0 with it so that's definitely a net saving.

No backport is required, this is only for 1.9.
include/common/config.h
include/common/hathreads.h