From 082627af77bf062c94920a742269dfca241f62c8 Mon Sep 17 00:00:00 2001 From: Olivier Houchard Date: Mon, 28 May 2018 14:53:08 +0200 Subject: [PATCH] MINOR: task: Also consider the task list size when getting global tasks. We're taking tasks from the global runqueue based on the number of tasks the thread already have in its local runqueue, but now that we have a task list, we also have to take that into account. --- src/task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index 25ffe21db..fb4840738 100644 --- a/src/task.c +++ b/src/task.c @@ -260,7 +260,7 @@ void process_runnable_tasks() * much elements from the global list as to have a bigger local queue * than the average. */ - while (rqueue_size[tid] <= average) { + while ((task_list_size[tid] + rqueue_size[tid]) <= average) { /* we have to restart looking up after every batch */ rq_next = eb32sc_lookup_ge(&rqueue, rqueue_ticks - TIMER_LOOK_BACK, tid_bit);