]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: pool: improve needed_avg cache line access pattern
authorWilly Tarreau <w@1wt.eu>
Mon, 8 Jul 2024 16:28:54 +0000 (18:28 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Jul 2024 14:46:38 +0000 (16:46 +0200)
commit87d269707bf804c60da1aaf67d8fd91ade3069e3
tree06922c74646609e17d45d7b382f63dc73fc6b53d
parent9797a7718c187c40d63fcbbc1631dcd93ba42aac
OPTIM: pool: improve needed_avg cache line access pattern

On an AMD EPYC 3rd gen, 20% of the CPU is spent calculating the amount
of pools needed when using QUIC, because pool allocations/releases are
quite frequent and the inter-CCX communication is super slow. Still,
there's a way to save between 0.5 and 1% CPU by using fetch-add and
sub-fetch that are converted to XADD so that the result is directly
fed into the swrate_add argument without having to re-read the memory
area. That's what this patch does.
src/pool.c