diff --git a/taskvine/src/manager/vine_manager.c b/taskvine/src/manager/vine_manager.c index 98f21b475a..075ae775bd 100644 --- a/taskvine/src/manager/vine_manager.c +++ b/taskvine/src/manager/vine_manager.c @@ -1,4 +1,5 @@ /* +/* Copyright (C) 2022- The University of Notre Dame This software is distributed under the GNU General Public License. See the file COPYING for details. @@ -4369,10 +4370,11 @@ static void push_task_to_ready_tasks(struct vine_manager *q, struct vine_task *t { if (t->result == VINE_RESULT_RESOURCE_EXHAUSTION) { /* when a task is resubmitted given resource exhaustion, we - * push it at the head of the list, so it gets to run as soon - * as possible. This avoids the issue in which all 'big' tasks - * fail because the first allocation is too small. */ - priority_queue_push(q->ready_tasks, t, t->priority); + * increment its priority by 1, so it gets to run as soon + * as possible among those with the same priority. This avoids + * the issue in which all 'big' tasks fail because the first + * allocation is too small. */ + priority_queue_push(q->ready_tasks, t, t->priority + 1); } else { priority_queue_push(q->ready_tasks, t, t->priority); }