Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment the priority for tasks exhausting resources #3987

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -4369,10 +4369,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);
}
Expand Down
Loading