CLEANUP: global: reorder some fields to respect cache lines
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Mar 2021 17:23:19 +0000 (18:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 07:30:08 +0000 (08:30 +0100)
commit90e9b8c8b6d03f5e45d11c244cd7a9ff175bfae3
treee9b5b2f84c5e2d53a311fefb4547ea4cac1cf404
parentcc2672f48ba20b68e90144775c0c70839f87ca50
CLEANUP: global: reorder some fields to respect cache lines

Some entries are atomically updated by various threads, such as the
global counters, and they're mixed with others which are read all the
time like the mode. This explains why "perf" was seeing a huge access
cost on global.mode in process_stream()! Let's reorder them so that
the static config stuff is at the beginning and the live stuff is at
the end.
include/haproxy/global-t.h