]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: stream: explain why we queue the stream at the head of the server list
authorUbuntu <ubuntu@ip-172-31-37-79.us-east-2.compute.internal>
Mon, 1 Mar 2021 06:21:47 +0000 (06:21 +0000)
committerWilly Tarreau <w@1wt.eu>
Fri, 5 Mar 2021 07:30:08 +0000 (08:30 +0100)
commit6fa922562893cc5347da3568cf11a22afe5b1b60
treea7cb8b41dc472c1c0b1b248dc38b4d9aab9fc680
parent2f67e54dca7fcd4c9994dacfbc071af5bd4f2ae8
CLEANUP: stream: explain why we queue the stream at the head of the server list

In stream_add_srv_conn() MT_LIST_ADD() is used instead of MT_LIST_ADDQ(),
resulting in the stream being queued at the end of the server list. This
has no particular effect since we cannot dump the streams on a server,
and this is only used by "shutdown sessions" on a server. But it also
turns out to be significantly faster due to the shorter recovery from
the conflict with an adjacent MT_LIST_DEL(), thus it remains desirable
to use it, but at least it deserves a comment.

In addition to this, it's worth mentioning that this list should creates
extreme contention with threads while almost never used. It should be
made per-thread just like the global streams list.
include/haproxy/stream.h