]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: thread: move the flags to the shared cache line
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Jun 2022 07:00:08 +0000 (09:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:14 +0000 (19:15 +0200)
commit8e079cdd4432946abd7d22d44b5a1090b35871c4
treeefa54f77ecf001b56d49c7a916e0aa96c23a5c0a
parentf3efef4d60458fb1d40ac6978169f3e9479f1121
MINOR: thread: move the flags to the shared cache line

The thread flags were once believed to be local to the thread, but as
it stands, even the STUCK flag is shared since it's looked at by the
watchdog. As such we'll need to use atomic ops to manipulate them, and
likely to move them into the shared area.

This patch only moves the flag into the shared area so that we can later
decide whether it's best to leave them there or to move them back to the
local area. Interestingly, some tests have shown a 3% better performance
on dequeuing with this, while they're not used by other threads yet, so
there are definitely alignment effects that might change over time.
include/haproxy/tinfo-t.h