From 9852d5be26db905884dfa5e8ed48d2a500694c32 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sat, 21 Mar 2026 14:52:52 +0000 Subject: [PATCH] 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. --- src/task.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/task.c b/src/task.c index 8f5523587..08de79f4f 100644 --- a/src/task.c +++ b/src/task.c @@ -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 { -- 2.47.3