]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: tasks: make sure we pick all tasks in the run queue
authorWilly Tarreau <w@1wt.eu>
Thu, 26 Jul 2018 11:36:01 +0000 (13:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 26 Jul 2018 12:24:46 +0000 (14:24 +0200)
commit9a77186cb08f910d927e4410d315dedddf65b12d
treec69413c1c4f7d08b657dea65c8250d567b5bd1f8
parent306e653331f107902f6211f03e09779cfe0171d0
BUG/MEDIUM: tasks: make sure we pick all tasks in the run queue

Commit 09eeb76 ("BUG/MEDIUM: tasks: Don't forget to increase/decrease
tasks_run_queue.") addressed a count issue in the run queue and uncovered
another issue with the way the tasks are dequeued from the global run
queue. The number of tasks to pick is computed using an integral divide,
which results in up to nbthread-1 tasks never being run. The fix simply
consists in getting rid of the divide and checking the task count in the
loop.

No backport is needed, this is 1.9-specific.
src/task.c