]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: tasklets: Add the thread as active when waking a tasklet.
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 17 Aug 2018 16:57:51 +0000 (18:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Aug 2018 16:06:33 +0000 (18:06 +0200)
Set the flag for the current thread in active_threads_mask when waking a
tasklet, or we will never run it if no tasks are available.

This is 1.9-specific, no backport is needed.

include/proto/task.h

index 13398c53e11ddc332dda3b0f50427982e38d343a..eef4ded436bf5b3d08e59ec6de9a8c43f4045b32 100644 (file)
@@ -226,6 +226,7 @@ static inline void tasklet_wakeup(struct tasklet *tl)
                return;
        LIST_ADDQ(&task_list[tid], &tl->list);
        task_list_size[tid]++;
+       HA_ATOMIC_OR(&active_tasks_mask, tid_bit);
        HA_ATOMIC_ADD(&tasks_run_queue, 1);
 
 }