diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-03-24 11:25:41 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-03-24 11:25:41 -0400 |
commit | ae73c266aaf6e14b1e303d8066d3036cf3d62c37 (patch) | |
tree | a371e8a4ecd237dc47fa19b6ac70151df39aa149 /litmus | |
parent | e9ef5f31aeb99b4f00de62557aaf51e670a4b0f9 (diff) |
PFAIR: don't arm timer for tardy tasks
If the system is overloaded, tasks may be tardy. In that case, do not
arm timers. Rather, add tardy tasks back into the ready queue right
away.
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_pfair.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/litmus/sched_pfair.c b/litmus/sched_pfair.c index c5ec177f236b..4f9a8c2ecdc3 100644 --- a/litmus/sched_pfair.c +++ b/litmus/sched_pfair.c | |||
@@ -630,9 +630,14 @@ static void process_out_of_budget_tasks( | |||
630 | list_del(&tsk_rt(t)->list); | 630 | list_del(&tsk_rt(t)->list); |
631 | if (t != prev || !blocks) | 631 | if (t != prev || !blocks) |
632 | { | 632 | { |
633 | sched_trace_task_release(t); | 633 | if (time_after(cur_release(t), state->local_tick)) { |
634 | add_release(&cpu_cluster(state)->pfair, t); | 634 | TRACE_TASK(t, "adding to release queue (budget exhausted)\n"); |
635 | TRACE_TASK(t, "adding to release queue (budget exhausted)\n"); | 635 | add_release(&cpu_cluster(state)->pfair, t); |
636 | } else { | ||
637 | TRACE_TASK(t, "adding to ready queue (budget exhausted)\n"); | ||
638 | sched_trace_task_release(t); | ||
639 | __add_ready(&cpu_cluster(state)->pfair, t); | ||
640 | } | ||
636 | } else { | 641 | } else { |
637 | TRACE_TASK(t, "not added to release queue (blocks=%d)\n", blocks); | 642 | TRACE_TASK(t, "not added to release queue (blocks=%d)\n", blocks); |
638 | tsk_pfair(t)->needs_requeue = 1; | 643 | tsk_pfair(t)->needs_requeue = 1; |