]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: task: add a new flag TASK_RT to permit a task to skip the priority queue
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2026 14:35:21 +0000 (16:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2026 17:08:00 +0000 (19:08 +0200)
commit40ad8a129cbce6c2a4db2f3b050c2b81b8257592
tree9b002d7648cceb6879233fdf564666d2734c954f
parent69c799f286344bfe3110d51fcce02a37f2ea6078
MEDIUM: task: add a new flag TASK_RT to permit a task to skip the priority queue

For some very rare tasks that need to be woken up at an exact date (right
now the only known use case is haload's periodic stats collection), it's
currently difficult to guarantee the wake up date on a heavily loaded
run queue.

This patch introduces TASK_RT for real-time tasks. Right now, all it does
is modify __task_wakeup() to immediately switch to __tasklet_wakeup_*()
and effectively bypass the priority-based run queue. Doing it here has
the benefit of making sure that it automatically applies to tasks found
in the wait queue, and that it will also work for _task_drop_running().

For now nothing uses it. The doc was updated.
doc/internals/api/scheduler.txt
include/haproxy/task-t.h
src/task.c