haproxy/include/common
Christopher Faulet d4604adeaa MAJOR: threads/fd: Make fd stuffs thread-safe
Many changes have been made to do so. First, the fd_updt array, where all
pending FDs for polling are stored, is now a thread-local array. Then 3 locks
have been added to protect, respectively, the fdtab array, the fd_cache array
and poll information. In addition, a lock for each entry in the fdtab array has
been added to protect all accesses to a specific FD or its information.

For pollers, according to the poller, the way to manage the concurrency is
different. There is a poller loop on each thread. So the set of monitored FDs
may need to be protected. epoll and kqueue are thread-safe per-se, so there few
things to do to protect these pollers. This is not possible with select and
poll, so there is no sharing between the threads. The poller on each thread is
independant from others.

Finally, per-thread init/deinit functions are used for each pollers and for FD
part for manage thread-local ressources.

Now, you must be carefull when a FD is created during the HAProxy startup. All
update on the FD state must be made in the threads context and never before
their creation. This is mandatory because fd_updt array is thread-local and
initialized only for threads. Because there is no pollers for the main one, this
array remains uninitialized in this context. For this reason, listeners are now
enabled in run_thread_poll_loop function, just like the worker pipe.
2017-10-31 13:58:30 +01:00
..
accept4.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
base64.h
buffer.h MINOR: buffer: add the buffer input manipulation functions 2017-10-27 10:00:17 +02:00
cfgparse.h MEDIUM: cfgparse: post parsing registration 2017-10-27 10:15:56 +02:00
chunk.h MINOR: chunks: Use dedicated function to init/deinit trash buffers 2017-09-05 10:22:20 +02:00
compat.h BUILD: tcp: define SOL_TCP when only IPPROTO_TCP exists 2016-08-10 21:11:38 +02:00
compiler.h MINOR: compiler: restore the likely() wrapper for gcc 5.x 2017-10-08 22:32:05 +02:00
config.h MINOR: threads: Add THREAD_LOCAL macro 2017-10-31 11:36:13 +01:00
debug.h MINOR: debug: enable memory poisonning to use byte 0 2015-10-08 14:12:13 +02:00
defaults.h MINOR: log: Add logurilen tunable. 2017-06-02 11:06:36 +02:00
epoll.h
errors.h
hash.h MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
hathreads.h MAJOR: threads/fd: Make fd stuffs thread-safe 2017-10-31 13:58:30 +01:00
http-hdr.h MINOR: http: add very simple header management based on double strings 2017-10-22 09:54:14 +02:00
ist.h MINOR: ist: add ist0() to add a trailing zero to a string. 2017-10-19 15:01:08 +02:00
memory.h MEDIUM: threads/pool: Make pool thread-safe by locking all access to a pool 2017-10-31 13:58:30 +01:00
mini-clist.h MEDIUM: lists: list_for_each_entry{_safe}_from functions 2017-10-31 03:44:11 +01:00
namespace.h CLEANUP: namespaces: fix protection against multiple inclusions 2015-04-08 17:31:40 +02:00
net_helper.h MINOR: net_helper: add 64-bit read/write functions 2017-09-21 06:27:08 +02:00
rbtree.h
regex.h MEDIUM: regex: pcre2 support 2016-12-28 12:51:51 +01:00
splice.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
standard.h MINOR: standard: Add memvprintf function 2017-10-31 11:36:12 +01:00
syscall.h BUILD: enable build on Linux/s390x 2015-10-12 20:58:51 +02:00
template.h
ticks.h
time.h MEDIUM: threads/time: Many global variables from time.h are now thread-local 2017-10-31 13:58:30 +01:00
tools.h
uri_auth.h MINOR: stats: add ST_SHOWADMIN to pass the admin info in the regular flags 2016-03-11 17:08:05 +01:00
version.h [RELEASE] Released version 1.8-dev1 2017-04-03 09:27:49 +02:00
xref.h MINOR: xref: Add a new xref system 2017-09-11 18:59:40 +02:00