]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: tasks: Increase the right niced_task counter
authorOlivier Houchard <ohouchard@haproxy.com>
Mon, 1 Jun 2026 16:17:50 +0000 (18:17 +0200)
committerOlivier Houchard <cognet@ci0.org>
Mon, 1 Jun 2026 15:52:13 +0000 (17:52 +0200)
commit24455aa4e0879556ad330f8ae72675864d7a76a3
tree79c855db15775bf65e09d40488ee0a843a056b05
parentc0aa9f01f113c2b61794107ee1b79e28a59bd896
BUG/MINOR: tasks: Increase the right niced_task counter

In __task_wakeup(), for a niced task, we don't always want to increase
the niced_task counter of the running thread's thread group, if we are
waking up the task of another thread, who belongs to a different thread
group, then we want to increment that thread group's counter instead, as
that's the one that will get decremented later.
So just increase the counter for the target thread'd thread group,
instead of using tg_ctx.
The impact is probably pretty minor, niced task shared amongst thread
are not very common, and the impact would mostly mean we'd run more/less
tasks in one run of process_runnable_tasks() than expected.
This should be backported as far as 2.8.
src/task.c