haproxy/doc/internals
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
..
acl.txt DOC: fix some spelling issues over multiple files 2021-01-08 14:53:47 +01:00
body-parsing.txt DOC: Fix typos in different subsections of the documentation 2018-11-18 22:23:15 +01:00
buffer-api.txt CLEANUP: dynbuf: remove the unused b_alloc_fast() function 2021-03-22 16:28:05 +01:00
connect-status.txt
connection-header.txt DOC: Fix typos in different subsections of the documentation 2018-11-18 22:23:15 +01:00
connection-scale.txt
entities-v2.txt DOC: assorted typo fixes in the documentation 2020-03-09 14:45:58 +01:00
entities.fig
entities.pdf
entities.svg
entities.txt DOC: assorted typo fixes in the documentation 2020-03-09 14:45:58 +01:00
fd-migration.txt MAJOR: fd: get rid of the DWCAS when setting the running_mask 2021-08-04 16:03:36 +02:00
filters.txt DOC: remove last occurrences of "HA-Proxy" syntax 2021-05-09 06:29:40 +02:00
hashing.txt [RELEASE] Released version 2.4-dev19 2021-05-10 07:50:26 +02:00
header-parser-speed.txt
header-tree.txt
http-cookies.txt
http-docs.txt
http-parsing.txt
htx-api.txt DOC: fix a few remainig cases of "Haproxy" and "HAproxy" in doc and comments 2021-05-09 06:50:46 +02:00
initcalls.txt DOC: assorted typo fixes in the documentation 2020-03-18 11:34:33 +01:00
list.fig [RELEASE] Released version 2.4-dev17 2021-04-23 19:11:10 +02:00
list.png CLEANUP: lists/tree-wide: rename some list operations to avoid some confusion 2021-04-21 09:20:17 +02:00
listener-states.fig [RELEASE] Released version 2.3-dev6 2020-10-10 10:45:13 +02:00
listener-states.png MEDIUM: listeners: remove the now unused ZOMBIE state 2020-10-09 11:27:29 +02:00
lua_socket.fig [RELEASE] Released version 1.8-dev3 2017-10-22 10:13:45 +02:00
lua_socket.pdf MEDIUM: xref/lua: Use xref for referencing cosocket relation between stream and lua 2017-09-11 18:59:40 +02:00
muxes.fig [RELEASE] Released version 2.4-dev10 2021-02-26 22:49:10 +01:00
muxes.pdf DOC: muxes: add a diagram of the exchanges between muxes and outer world 2021-02-24 09:13:00 +01:00
muxes.png DOC: muxes: add a diagram of the exchanges between muxes and outer world 2021-02-24 09:13:00 +01:00
muxes.svg DOC: muxes: add a diagram of the exchanges between muxes and outer world 2021-02-24 09:13:00 +01:00
naming.txt
notes-layers.txt DOC: assorted typo fixes in the documentation 2020-03-09 14:45:58 +01:00
pattern.dia
pattern.pdf
polling-states.fig [RELEASE] Released version 2.3-dev7 2020-10-17 10:31:50 +02:00
repartition-be-fe-fi.txt
sched.fig [RELEASE] Released version 2.4-dev10 2021-02-26 22:49:10 +01:00
sched.pdf DOC: scheduler: add a diagram showing the different queues and their usages 2021-02-26 17:49:37 +01:00
sched.png DOC: scheduler: add a diagram showing the different queues and their usages 2021-02-26 17:49:37 +01:00
sched.svg DOC: scheduler: add a diagram showing the different queues and their usages 2021-02-26 17:49:37 +01:00
sequence.fig
ssl_cert.dia DOC: internals: update the SSL architecture schema 2021-05-17 10:50:24 +02:00
stats-v2.txt
stream-sock-states.fig [RELEASE] Released version 2.0-dev6 2019-06-07 06:12:59 +02:00