haproxy/include/common
Willy Tarreau 3e853ea74d MINOR: pools: release the pool's lock during the malloc/free calls
The malloc and free calls and especially the underlying mmap/munmap()
can occasionally take a huge amount of time and even cause the thread
to sleep. This is visible when haproxy is compiled with DEBUG_UAF which
causes every single pool allocation/free to allocate and release pages.
In this case, when using the locked pools, the watchdog can occasionally
fire under high contention (typically requesting 40000 1M objects in
parallel over 8 threads). Then, "perf top" shows that 50% of the CPU
time is spent in mmap() and munmap(). The reason the watchdog fires is
because some threads spin on the pool lock which is held by other threads
waiting on mmap() or munmap().

This patch modifies this so that the pool lock is released during these
syscalls. Not only this allows other threads to request try to allocate
their data in parallel, but it also considerably reduces the lock
contention.

Note that the locked pools are only used on small architectures where
high thread counts would not make sense, so this will not provide any
benefit in the general case. However it makes the debugging versions
way more stable, which is always appreciated.
2019-07-09 10:40:33 +02:00
..
accept4.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
base64.h
buf.h MINOR: buffer: add a new buffer ring API to manipulate rings of buffers 2019-05-26 09:26:59 +02:00
buffer.h MEDIUM: buffers: relax the buffer lock a little bit 2019-05-28 17:25:21 +02:00
cfgparse.h
chunk.h BUILD: chunk: properly declare pool_head_trash as extern 2019-03-29 21:03:20 +01:00
compat.h BUILD: signals: FreeBSD has SI_LWP instead of SI_TKILL 2019-05-23 08:40:50 +02:00
compiler.h
config.h
debug.h CLEANUP: debug: remove the TRACE() macro 2019-05-26 09:25:59 +02:00
defaults.h MINOR: config: continue to rely on DEFAULT_MAXCONN to set the minimum maxconn 2019-03-13 10:10:49 +01:00
epoll.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
errors.h
h1.h BUG/MEDIUM: h1: Don't parse chunks CRLF if not enough data are available 2019-04-19 15:53:23 +02:00
h2.h
hash.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hathreads.h MEDIUM: threads: add thread_sync_release() to synchronize steps 2019-06-10 09:42:43 +02:00
hpack-dec.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-enc.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-huff.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-tbl.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
http-hdr.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
http.h BUILD: do not specify "const" on functions returning structs or scalars 2019-04-15 21:55:48 +02:00
htx.h BUG/MEDIUM: channel/htx: Use the total HTX size in channel_htx_recv_limit() 2019-07-02 21:32:45 +02:00
initcall.h MINOR: initcall: Don't forget to define the __start/stop_init_##stg symbols. 2019-04-10 16:33:25 +02:00
ist.h BUILD: ist: turn the lower/upper case tables to literal on obsolete linkers 2019-05-15 16:14:04 +02:00
istbuf.h BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
memory.h MINOR: pools: release the pool's lock during the malloc/free calls 2019-07-09 10:40:33 +02:00
mini-clist.h MINOR: lists: add LIST_ADDED() to check if an element belongs to a list 2019-05-13 19:14:52 +02:00
namespace.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
net_helper.h
openssl-compat.h CLEANUP: ssl: move all BIO_* definitions to openssl-compat 2019-05-11 17:39:08 +02:00
regex.h MEDIUM: regex: modify regex_comp() to atomically allocate/free the my_regex struct 2019-05-07 06:58:15 +02:00
splice.h CLEANUP: build: rename some build macros to use the USE_* ones 2019-05-22 19:47:57 +02:00
standard.h MEDIUM: tools: improve time format error detection 2019-06-07 19:32:02 +02:00
syscall.h
template.h
ticks.h
time.h CLEANUP: time: refine the test on _POSIX_TIMERS 2019-05-21 20:03:03 +02:00
tools.h
uri_auth.h
version.h [RELEASE] Released version 2.1-dev0 2019-06-16 21:49:47 +02:00
xref.h MEDIUM: xref: Use the new _HA_ATOMIC_* macros. 2019-03-11 17:02:37 +01:00