OPTIM: server: switch the actconn list to an mt-list
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Feb 2021 12:33:24 +0000 (13:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 18 Feb 2021 09:06:45 +0000 (10:06 +0100)
commit751153e0f119bec90455cda95166f1b29d8b0326
treecb37fa81eaf2ddba084655b0233ff09d66658cee
parentccea3c54f4b39774ccb48cfd604a22acb8e59c86
OPTIM: server: switch the actconn list to an mt-list

The remaining contention on the server lock solely comes from
sess_change_server() which takes the lock to add and remove a
stream from the server's actconn list. This is both expensive
and pointless since we have mt-lists, and this list is only
used by the CLI's "shutdown server sessions" command!

Let's migrate to an mt-list and remove the need for this costly
lock. By doing so, the request rate increased by ~1.8%.
include/haproxy/server-t.h
include/haproxy/stream-t.h
include/haproxy/stream.h
src/hlua.c
src/queue.c
src/server.c
src/stream.c