MINOR: sched: do not requeue a tasklet into the current queue

As found by Christopher, the concept of waking a tasklet up into the
current queue is totally flawed, because if a task is in TL_BULK or
TL_HEAVY, all the tasklets it will wake up will end up in the same
queue. Not only this will clobber such queues, but it will also
reduce their quality of service, and this can contaminate other
tasklets due to the numerous wakeups there are now with the subsribe
mechanism between layers.
This commit is contained in:
Willy Tarreau 2026-03-21 14:52:52 +00:00 committed by Willy Tarreau
parent 7d40b3134a
commit 9852d5be26

View file

@ -157,8 +157,8 @@ void __tasklet_wakeup_on(struct tasklet *tl, int thr)
th_ctx->tl_class_mask |= 1 << TL_URGENT;
}
else {
LIST_APPEND(&th_ctx->tasklets[th_ctx->current_queue], &tl->list);
th_ctx->tl_class_mask |= 1 << th_ctx->current_queue;
LIST_APPEND(&th_ctx->tasklets[TL_NORMAL], &tl->list);
th_ctx->tl_class_mask |= 1 << TL_NORMAL;
}
_HA_ATOMIC_INC(&th_ctx->rq_total);
} else {
@ -196,8 +196,8 @@ struct list *__tasklet_wakeup_after(struct list *head, struct tasklet *tl)
th_ctx->tl_class_mask |= 1 << TL_URGENT;
}
else {
LIST_INSERT(&th_ctx->tasklets[th_ctx->current_queue], &tl->list);
th_ctx->tl_class_mask |= 1 << th_ctx->current_queue;
LIST_INSERT(&th_ctx->tasklets[TL_NORMAL], &tl->list);
th_ctx->tl_class_mask |= 1 << TL_NORMAL;
}
}
else {