haproxy/include
Willy Tarreau b20aa9eef3 MAJOR: tasks: create per-thread wait queues
Now we still have a main contention point with the timers in the main
wait queue, but the vast majority of the tasks are pinned to a single
thread. This patch creates a per-thread wait queue and queues a task
to the local wait queue without any locking if the task is bound to a
single thread (the current one) otherwise to the shared queue using
locking. This significantly reduces contention on the wait queue. A
test with 12 threads showed 11 ms spent in the WQ lock compared to
4.7 seconds in the same test without this change. The cache miss ratio
decreased from 19.7% to 19.2% on the 12-thread test, and its performance
increased by 1.5%.

Another indirect benefit is that the average queue size is divided
by the number of threads, which roughly removes log(nbthreads) levels
in the tree and further speeds up lookups.
2018-10-15 19:04:40 +02:00
..
common MINOR: tools: add a new function atleast2() to test masks for more than 1 bit 2018-10-15 13:25:06 +02:00
import BUILD: threads/plock: fix a build issue on Clang without optimization 2017-11-20 21:06:35 +01:00
proto MAJOR: tasks: create per-thread wait queues 2018-10-15 19:04:40 +02:00
types MINOR: h1: Add the flag H1_MF_NO_PHDR to not add pseudo-headers during parsing 2018-10-12 16:15:18 +02:00