Don't forget to increase tasks_run_queue when we're adding a task to the
tasklet list, and to decrease it when we remove a task from a runqueue,
or its value won't be accurate, and could lead to tasks not being executed
when put in the global run queue.
1.9-dev only, no backport is needed.
*/
static inline struct task *__task_unlink_rq(struct task *t)
{
+ HA_ATOMIC_SUB(&tasks_run_queue, 1);
eb32sc_delete(&t->rq);
if (likely(t->nice))
HA_ATOMIC_SUB(&niced_tasks, 1);
*/
if (unlikely(!HA_ATOMIC_CAS(&t->rq.node.leaf_p, &expected, 0x1)))
return;
+ HA_ATOMIC_ADD(&tasks_run_queue, 1);
task_list_size[tid]++;
tl = (struct tasklet *)t;
LIST_ADDQ(&task_list[tid], &tl->list);