]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: fd: move a few read-mostly variables to their own section
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 14:58:13 +0000 (16:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 17:27:41 +0000 (19:27 +0200)
commita1090a5b61247da206dd6aad2508345af2b0412f
treed74c5091fb42b9c28935c362b705b3eecb3325a0
parentf459640ef6492f8e06967c23305f48e06858df11
MINOR: fd: move a few read-mostly variables to their own section

Some pointer to arrays such as fdtab, fdinfo, polled_mask etc are never
written to at run time but are used a lot. fdtab accesses appear a lot in
perf top because ha_used_fds is in the same cache line and is modified
all the time. This patch moves all these read-mostly variables to the
read_mostly section when defined. This way their cache lines will be
able to remain in shared state in all CPU caches.
src/fd.c