]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tasks: implement a lockless scheduler for single-thread usage
authorWilly Tarreau <w@1wt.eu>
Sun, 5 Nov 2017 15:35:59 +0000 (16:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 6 Nov 2017 10:20:11 +0000 (11:20 +0100)
commitf0c531ab5516d179a83a44b1a34b26ffde5e2f51
treeecc34c5608a529b16b1c6e3c448d31c557705a50
parent9d4b56b88e01ac874a158f9bd4dd8c804ba61875
MEDIUM: tasks: implement a lockless scheduler for single-thread usage

The scheduler is complex and uses local queues to amortize the cost of
locks. But all this comes with a cost that is quite observable with
single-thread workloads.

The purpose of this patch is to reimplement the much simpler scheduler
for the case where threads are not used. The code is very small and
simple. It doesn't impact the multi-threaded performance at all, and
provides a nice 10% performance increase in single-thread by reaching
606kreq/s on the tests that showed 550kreq/s before.
src/task.c