MINOR: task: use LIST_DEL_INIT() to remove a task from the queue

By using LIST_DEL_INIT() instead of LIST_DEL()+LIST_INIT() we manage
to bump the peak connection rate by no less than 3% on 8 threads.
The perf top profile shows much less contention in this area which
suffered from the second reload.
This commit is contained in:
Willy Tarreau 2019-03-06 19:34:25 +01:00
parent c5bd311b2a
commit b238b12e98

View File

@ -271,8 +271,7 @@ static inline void task_insert_into_tasklet_list(struct task *t)
static inline void task_remove_from_task_list(struct task *t)
{
LIST_DEL(&((struct tasklet *)t)->list);
LIST_INIT(&((struct tasklet *)t)->list);
LIST_DEL_INIT(&((struct tasklet *)t)->list);
task_per_thread[tid].task_list_size--;
HA_ATOMIC_SUB(&tasks_run_queue, 1);
if (!TASK_IS_TASKLET(t)) {