]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: thread: make stopping_threads per-group and add stopping_tgroups
authorWilly Tarreau <w@1wt.eu>
Tue, 28 Jun 2022 17:29:29 +0000 (19:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Jul 2022 17:15:15 +0000 (19:15 +0200)
commitef422ced91ab333a7c82259146de54ca327e2a26
tree17dea8b512b0f840eee04f53cf06760ad5ad91dd
parent03f9b35114bec1efaa9cbca21c62b0a588ca3036
MEDIUM: thread: make stopping_threads per-group and add stopping_tgroups

Stopping threads need a mask to figure who's still there without scanning
everything in the poll loop. This means this will have to be per-group.
And we also need to have a global stopping groups mask to know what groups
were already signaled. This is used both to figure what thread is the first
one to catch the event, and which one is the first one to detect the end of
the last job. The logic isn't changed, though a loop is required in the
slow path to make sure all threads are aware of the end.

Note that for now the soft-stop still takes time for group IDs > 1 as the
poller is not yet started on these threads and needs to expire its timeout
as there's no way to wake it up. But all threads are eventually stopped.
include/haproxy/tinfo-t.h
src/haproxy.c