]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: pool: only use opportunistic versions of the swrate_add() functions
authorWilly Tarreau <w@1wt.eu>
Mon, 19 Dec 2022 16:26:25 +0000 (17:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 20 Dec 2022 13:51:12 +0000 (14:51 +0100)
commit2aa14ce5a1df0f7f74f0826e252c5312824c79bf
tree6cd763164e7c263008c9e56ac58660fd3fcc063d
parente327b4a73e3ac5fce223aa34d1ed293ad8a57cf4
MINOR: pool: only use opportunistic versions of the swrate_add() functions

We don't need to know very accurately how much RAM is needed in a pool,
however we must not spend time competing with other threads trying to be
the one with the most accurate value. Let's use the "_opportunistic"
variants of swrate_add() which will simply cause some updates to be
dropped in case of thread contention. This should significantly improve
the situation when dealing with many threads and small per-thread caches.

Performance gains of up to 1-2% were observed on 48-thread systems thanks
to this alone.
src/pool.c