]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: polling: Use active_appels_mask instead of applets_active_queue
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 14 Nov 2017 10:30:47 +0000 (11:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 16 Nov 2017 10:19:46 +0000 (11:19 +0100)
commit7163056dc55e39e57768c0857040125e7b9db4f1
tree67e618d64a978e9c26db51cfe194efe6a162151d
parent595d7b72a6a58c175bfeb3c44dd51a05ffcdeab3
MAJOR: polling: Use active_appels_mask instead of applets_active_queue

applets_active_queue is the active queue size. It is a global variable. So it is
underoptimized because we may be lead to consider there are active applets for a
thread while in fact all active applets are assigned to the otherthreads. So, in
such cases, the polling loop will be evaluated many more times than necessary.

Instead, we now check if the thread id is set in the bitfield active_applets_mask.

This is specific to threads, no backport is needed.
src/applet.c
src/haproxy.c