BUG/MEDIUM: tasks: Don't forget to decrement tasks_run_queue.

When executing tasks, don't forget to decrement tasks_run_queue once we
popped one task from the task_list. tasks_run_queue used to be decremented
by __tasklet_remove_from_tasklet_list(), but we now call MT_LIST_POP().
This commit is contained in:
Olivier Houchard 2019-10-03 14:55:34 +02:00 committed by Olivier Houchard
parent c2ea47fb18
commit 07308677dd

View File

@ -393,6 +393,7 @@ void process_runnable_tasks()
t = (struct task *)MT_LIST_POP(&tt->task_list, struct tasklet *, list);
if (!t)
break;
_HA_ATOMIC_SUB(&tasks_run_queue, 1);
state = _HA_ATOMIC_XCHG(&t->state, TASK_RUNNING);
__ha_barrier_atomic_store();