aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/edf_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/edf_common.c')
-rw-r--r--litmus/edf_common.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/litmus/edf_common.c b/litmus/edf_common.c
index 255e4f36e413..441fbfddf0c2 100644
--- a/litmus/edf_common.c
+++ b/litmus/edf_common.c
@@ -22,7 +22,7 @@
22#include <litmus/fpmath.h> 22#include <litmus/fpmath.h>
23#endif 23#endif
24 24
25#if defined(CONFIG_EDF_TIE_BREAK_HASH) 25#ifdef CONFIG_EDF_TIE_BREAK_HASH
26#include <linux/hash.h> 26#include <linux/hash.h>
27static inline long edf_hash(struct task_struct *t) 27static inline long edf_hash(struct task_struct *t)
28{ 28{
@@ -134,7 +134,8 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second)
134 } 134 }
135 135
136 if (first->rt_param.is_aux_task && second->rt_param.is_aux_task && 136 if (first->rt_param.is_aux_task && second->rt_param.is_aux_task &&
137 first->rt_param.inh_task == second->rt_param.inh_task) { // inh_task is !NULL for both tasks since neither was a lo_aux task 137 first->rt_param.inh_task == second->rt_param.inh_task) {
138 // inh_task is !NULL for both tasks since neither was a lo_aux task.
138 // Both aux tasks inherit from the same task, so tie-break 139 // Both aux tasks inherit from the same task, so tie-break
139 // by base priority of the aux tasks. 140 // by base priority of the aux tasks.
140 TRACE_CUR("aux tie break!\n"); 141 TRACE_CUR("aux tie break!\n");
@@ -171,9 +172,10 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second)
171 } 172 }
172 173
173 if (first->rt_param.is_interrupt_thread && second->rt_param.is_interrupt_thread && 174 if (first->rt_param.is_interrupt_thread && second->rt_param.is_interrupt_thread &&
174 first->rt_param.inh_task == second->rt_param.inh_task) { // inh_task is !NULL for both tasks since neither was a lo_klmirqd task 175 first->rt_param.inh_task == second->rt_param.inh_task) {
175 // Both klmirqd tasks inherit from the same task, so tie-break 176 // inh_task is !NULL for both tasks since neither was a lo_klmirqd task.
176 // by base priority of the klmirqd tasks. 177 // Both klmirqd tasks inherit from the same task, so tie-break
178 // by base priority of the klmirqd tasks.
177 TRACE_CUR("klmirqd tie break!\n"); 179 TRACE_CUR("klmirqd tie break!\n");
178 goto klmirqd_tie_break; 180 goto klmirqd_tie_break;
179 } 181 }
@@ -220,8 +222,12 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second)
220 222
221#endif 223#endif
222 224
225#ifdef CONFIG_REALTIME_AUX_TASKS
223aux_tie_break: 226aux_tie_break:
227#endif
228#ifdef CONFIG_LITMUS_SOFTIRQD
224klmirqd_tie_break: 229klmirqd_tie_break:
230#endif
225 231
226 if (!is_realtime(second_task)) { 232 if (!is_realtime(second_task)) {
227 return 1; 233 return 1;
@@ -236,7 +242,7 @@ klmirqd_tie_break:
236 int pid_break; 242 int pid_break;
237 243
238#if defined(CONFIG_EDF_TIE_BREAK_LATENESS) 244#if defined(CONFIG_EDF_TIE_BREAK_LATENESS)
239 /* Tie break by lateness. Jobs with greater lateness get 245 /* Tie break by lateness. Jobs with greater lateness get
240 * priority. This should spread tardiness across all tasks, 246 * priority. This should spread tardiness across all tasks,
241 * especially in task sets where all tasks have the same 247 * especially in task sets where all tasks have the same
242 * period and relative deadlines. 248 * period and relative deadlines.