haproxy/doc
Willy Tarreau f69fea64e0 MAJOR: fd: get rid of the DWCAS when setting the running_mask
Right now we're using a DWCAS to atomically set the running_mask while
being constrained by the thread_mask. This DWCAS is annoying because we
may seriously need it later when adding support for thread groups, for
checking that the running_mask applies to the correct group.

It turns out that the DWCAS is not strictly necessary because we never
need it to set the thread_mask based on the running_mask, only the other
way around. And in fact, the running_mask is always cleared alone, and
the thread_mask is changed alone as well. The running_mask is only
relevant to indicate a takeover when the thread_mask matches it. Any
bit set in running and not present in thread_mask indicates a transition
in progress.

As such, it is possible to re-arrange this by using a regular CAS around a
consistency check between running_mask and thread_mask in fd_update_events
and by making a CAS on running_mask then an atomic store on the thread_mask
in fd_takeover(). The only other case is fd_delete() but that one already
sets the running_mask before clearing the thread_mask, which is compatible
with the consistency check above.

This change has happily survived 10 billion takeovers on a 16-thread
machine at 800k requests/s.

The fd-migration doc was updated to reflect this change.
2021-08-04 16:03:36 +02:00
..
design-thoughts
internals MAJOR: fd: get rid of the DWCAS when setting the running_mask 2021-08-04 16:03:36 +02:00
lua-api DOC: lua: Add a warning about buffers modification in HTTP 2021-06-14 12:03:32 +02:00
51Degrees-device-detection.txt CONTRIB: move 51Degrees to addons/51degrees 2021-04-02 17:48:42 +02:00
DeviceAtlas-device-detection.txt CONTRIB: move src/da.c and contrib/deviceatlas to addons/deviceatlas 2021-04-02 17:48:42 +02:00
SOCKS4.protocol.txt
SPOE.txt DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and comments 2021-05-09 06:50:46 +02:00
WURFL-device-detection.txt CONTRIB: move src/wurfl.c and contrib/wurfl to addons/wurfl 2021-04-02 17:48:42 +02:00
acl.fig
architecture.txt DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and comments 2021-05-09 06:50:46 +02:00
close-options.txt MINOR: config: reject long-deprecated "option forceclose" 2021-06-11 16:57:34 +02:00
coding-style.txt DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and comments 2021-05-09 06:50:46 +02:00
configuration.txt MINOR: doc: rename conn_status in `option httsplog` 2021-08-02 10:57:49 +02:00
cookie-options.txt
gpl.txt
haproxy.1
intro.txt DOC: intro: Fix typo in starter guide 2021-05-27 08:26:43 +02:00
lgpl.txt
linux-syn-cookies.txt
lua.txt [RELEASE] Released version 2.4-dev19 2021-05-10 07:50:26 +02:00
management.txt MEDIUM: server: support track keyword for dynamic servers 2021-07-16 10:22:58 +02:00
netscaler-client-ip-insertion-protocol.txt
network-namespaces.txt
peers-v2.0.txt DOC: peers: fix the protocol tag name in the doc 2021-05-09 06:38:07 +02:00
peers.txt
proxy-protocol.txt DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and comments 2021-05-09 06:50:46 +02:00
queuing.fig
regression-testing.txt DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and comments 2021-05-09 06:50:46 +02:00
seamless_reload.txt