MINOR: task: add one extra tasklet class: TL_HEAVY
authorWilly Tarreau <w@1wt.eu>
Fri, 26 Feb 2021 08:16:22 +0000 (09:16 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 26 Feb 2021 11:00:53 +0000 (12:00 +0100)
commit401135cee6d7ecb93aff2139faccd0c64d88c06e
tree4199342e15178f27de438c5a6712482a1558561a
parent6ac61e39c491f6ca5a1843c787da2e92818ee02a
MINOR: task: add one extra tasklet class: TL_HEAVY

This class will be used exclusively for heavy processing tasklets. It
will be cleaner than mixing them with the bulk ones. For now it's
allocated ~1% of the CPU bandwidth.

The largest part of the patch consists in re-arranging the fields in the
task_per_thread structure to preserve a clean alignment with one more
list head. Since we're now forced to increase the struct past a second
cache line, it now uses 4 cache lines (for easy multiplying) with the
first two ones being exclusively used by local operations and the third
one mostly by atomic operations. Interestingly, this better arrangement
causes less stress and reduced the response time by 8 microseconds at
1 million requests per second.
include/haproxy/task-t.h
src/task.c