]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MAJOR: tasks: Create a per-thread runqueue.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 18 May 2018 16:38:23 +0000 (18:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 26 May 2018 17:27:29 +0000 (19:27 +0200)
commitf6e6dc12cd533b2d8bb6413a4b5f875ddfd3e6e3
treec3b2fea55c713718a865910329c95c43c83c305f
parent9f6af3322287b71b0f03cf24dd6df9f2f81bbf3c
MAJOR: tasks: Create a per-thread runqueue.

A lot of tasks are run on one thread only, so instead of having them all
in the global runqueue, create a per-thread runqueue which doesn't require
any locking, and add all tasks belonging to only one thread to the
corresponding runqueue.

The global runqueue is still used for non-local tasks, and is visited
by each thread when checking its own runqueue. The nice parameter is
thus used both in the global runqueue and in the local ones. The rare
tasks that are bound to multiple threads will have their nice value
used twice (once for the global queue, once for the thread-local one).
include/proto/task.h
src/task.c