mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 23:14:46 +00:00
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:
parent
c5bd311b2a
commit
b238b12e98
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user