]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: listener: replace the listener's spinlock with an rwlock
authorWilly Tarreau <w@1wt.eu>
Tue, 1 Feb 2022 15:23:00 +0000 (16:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 1 Feb 2022 15:51:55 +0000 (16:51 +0100)
commit08b6f9645248405bb1cdec59c6aa4f35a8ba3add
tree5f7da12618ca230c1a16c40d4d76247c144d8899
parent0e0969d6cf40fa05a9dfe9f49b2b75a08f671af5
MINOR: listener: replace the listener's spinlock with an rwlock

We'll need to lock the listener a little bit more during accept() and
tests show that a spinlock is a massive performance killer, so let's
first switch to an rwlock for this lock.

This patch might have to be backported for the next patch to work, and
if so, the change is almost mechanical (look for LISTENER_LOCK), but do
not forget about the few HA_SPIN_INIT() in the file. There's no reference
to this lock outside of listener.c nor listener-t.h.
include/haproxy/listener-t.h
src/listener.c