aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/edf_common.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-09-11 13:48:36 -0400
committerGlenn Elliott <gelliott@cs.unc.edu>2012-09-11 13:48:36 -0400
commitdc4e192937c56771ace227075e10b97f42eedae4 (patch)
treeb2ef543a6629726237234fe85423eda1518ec9f2 /litmus/edf_common.c
parentd3c32e91e3fce2a57083a734efae6d9de06ec02f (diff)
Fixed bug in edf_higher_prio().prop/robust-tie-break
The rewrite of edf_higher_prio() introduced a bug. When ALL other tie-breaks fail (even PIDs are equal), edf_higher_prio() is supposed to prioritize the task that has an inherited priority. (At least one task must have an inherited priority, due to checks earlier in the function.) However, the rewrite does the inheritance check on the inherited priority (second_task), not the original task (second). This bug can cause G-EDF to fall into an infinite loop in check_for_preemptions() as scheduling decisions thrash.
Diffstat (limited to 'litmus/edf_common.c')
-rw-r--r--litmus/edf_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/litmus/edf_common.c b/litmus/edf_common.c
index 52205df3ea8b..bfd3533e8965 100644
--- a/litmus/edf_common.c
+++ b/litmus/edf_common.c
@@ -157,7 +157,7 @@ int edf_higher_prio(struct task_struct* first,
157 /* If the PIDs are the same then the task with the 157 /* If the PIDs are the same then the task with the
158 * inherited priority wins. 158 * inherited priority wins.
159 */ 159 */
160 if (!second_task->rt_param.inh_task) { 160 if (!second->rt_param.inh_task) {
161 return 1; 161 return 1;
162 } 162 }
163 } 163 }