]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: thread: reduce the struct lock_stat to store only 30 buckets
authorWilly Tarreau <w@1wt.eu>
Mon, 10 Feb 2025 10:15:44 +0000 (11:15 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Feb 2025 17:34:43 +0000 (18:34 +0100)
commiteced1d6d8a1cca7748ad71e308ceb8faf5d55880
treeb775eba0b8b64217a7d6de47a59dfb25d19bdbc4
parentc2f2d6fd3c7178a372942c0a0380a361f614f5bd
DEBUG: thread: reduce the struct lock_stat to store only 30 buckets

Storing only 30 buckets means we only keep 256 bytes per label. This
further simplifies address calculation and reduces the memory used
without complicating the locking code. It means we won't measure wait
times larger than a second but we're not supposed to face this as it
would trigger the watchdog anyway. It may become a little bit just if
measuring using rdtsc() instead of now_mono_time() though (typically
the limit would be around 350ms for a 3 GHz CPU).
include/haproxy/thread-t.h
src/thread.c