]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: task: permanently flag tasklets waking themselves up
authorWilly Tarreau <w@1wt.eu>
Fri, 31 Jan 2020 09:48:10 +0000 (10:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 31 Jan 2020 16:45:10 +0000 (17:45 +0100)
commitbb238834da6bfe0d70a47d2d8fb0ecfe161b58a9
tree8a69407323a0805ff20005f740cf7fdb26ffb8b9
parent849d4f047f768184f30b989d06502c601f355b9f
MINOR: task: permanently flag tasklets waking themselves up

Commit a17664d829 ("MEDIUM: tasks: automatically requeue into the bulk
queue an already running tasklet") tried to inflict a penalty to
self-requeuing tasks/tasklets which correspond to those involved in
large, high-latency data transfers, for the benefit of all other
processing which requires a low latency. However, it turns out that
while it ought to do this on a case-by-case basis, basing itself on
the RUNNING flag isn't accurate because this flag doesn't leave for
tasklets, so we'd rather need a distinct flag to tag such tasklets.

This commit introduces TASK_SELF_WAKING to mark tasklets acting like
this. For now it's still set when TASK_RUNNING is present but this
will have to change. The flag is kept across wakeups.
include/proto/task.h
include/types/task.h
src/task.c