]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tasks: add a mask of the queues with active tasklets
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2020 07:39:48 +0000 (09:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Jun 2020 10:21:26 +0000 (12:21 +0200)
commit49f90bf148c8737620fff795ae15e2e57fec59cd
treebf0e5eb1c709d37e366d4a59a0252f9dd9340c4c
parentc0a08ba2df49e7096a25d7082699b389ee1d4776
MINOR: tasks: add a mask of the queues with active tasklets

It is neither convenient nor scalable to check each and every tasklet
queue to figure whether it's empty or not while we often need to check
them all at once. This patch introduces a tasklet class mask which gets
a bit 1 set for each queue representing one class of service. A single
test on the mask allows to figure whether there's still some work to be
done. It will later be usable to better factor the runqueue code.

Bits are set when tasklets are queued. They're cleared when queues are
emptied. It is possible that a queue is empty but has a bit if a tasklet
was added then removed, but this is not a problem as this is properly
checked for in run_tasks_from_list().
include/haproxy/task-t.h
include/haproxy/task.h
src/task.c