diff options
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/Kconfig | 31 | ||||
-rw-r--r-- | litmus/Makefile | 3 | ||||
-rw-r--r-- | litmus/aux_tasks.c | 23 | ||||
-rw-r--r-- | litmus/edf_common.c | 29 | ||||
-rw-r--r-- | litmus/litmus.c | 8 | ||||
-rw-r--r-- | litmus/sched_gsn_edf.c | 26 |
6 files changed, 81 insertions, 39 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig index 95e0671e2aec..c5dbc4a176ae 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig | |||
@@ -34,6 +34,37 @@ config RELEASE_MASTER | |||
34 | (http://www.cs.unc.edu/~anderson/papers.html). | 34 | (http://www.cs.unc.edu/~anderson/papers.html). |
35 | Currently only supported by GSN-EDF. | 35 | Currently only supported by GSN-EDF. |
36 | 36 | ||
37 | config REALTIME_AUX_TASKS | ||
38 | bool "Real-Time Auxillary Tasks" | ||
39 | depends on LITMUS_LOCKING | ||
40 | default n | ||
41 | help | ||
42 | Adds a system call that forces all non-real-time threads in a process | ||
43 | to become auxillary real-time tasks. These tasks inherit the priority of | ||
44 | the highest-prio *BLOCKED* real-time task (non-auxillary) in the process. | ||
45 | This allows the integration of COTS code that has background helper threads | ||
46 | used primarily for message passing and synchronization. If these | ||
47 | background threads are NOT real-time scheduled, then unbounded priority | ||
48 | inversions may occur if a real-time task blocks on a non-real-time thread. | ||
49 | |||
50 | Beware of the following pitfalls: | ||
51 | 1) Auxillary threads should not be CPU intensive. They should mostly | ||
52 | block on mutexes and condition variables. Violating this will | ||
53 | likely prevent meaningful analysis. | ||
54 | 2) Since there may be more than one auxillary thread per process, | ||
55 | priority inversions may occur with respect to single-threaded | ||
56 | task models if/when one of threads are scheduled simultanously | ||
57 | with another of the same identity. | ||
58 | 3) Busy-wait deadlock is likely between normal real-time tasks and | ||
59 | auxillary tasks synchronize using _preemptive_ spinlocks that do | ||
60 | not use priority inheritance. | ||
61 | |||
62 | These pitfalls are mitgated by the fact that auxillary tasks only | ||
63 | inherit priorities from blocked tasks (Blocking signifies that the | ||
64 | blocked task _may_ be waiting on an auxillary task to perform some | ||
65 | work.). Futher, auxillary tasks without an inherited priority are | ||
66 | _always_ scheduled with a priority less than any normal real-time task!! | ||
67 | |||
37 | endmenu | 68 | endmenu |
38 | 69 | ||
39 | menu "Real-Time Synchronization" | 70 | menu "Real-Time Synchronization" |
diff --git a/litmus/Makefile b/litmus/Makefile index f2dd7be7ae4a..67d8b8ee72bc 100644 --- a/litmus/Makefile +++ b/litmus/Makefile | |||
@@ -18,6 +18,7 @@ obj-y = sched_plugin.o litmus.o \ | |||
18 | bheap.o \ | 18 | bheap.o \ |
19 | binheap.o \ | 19 | binheap.o \ |
20 | ctrldev.o \ | 20 | ctrldev.o \ |
21 | aux_tasks.o \ | ||
21 | sched_gsn_edf.o \ | 22 | sched_gsn_edf.o \ |
22 | sched_psn_edf.o \ | 23 | sched_psn_edf.o \ |
23 | sched_pfp.o | 24 | sched_pfp.o |
@@ -31,7 +32,7 @@ obj-$(CONFIG_SCHED_TASK_TRACE) += sched_task_trace.o | |||
31 | obj-$(CONFIG_SCHED_DEBUG_TRACE) += sched_trace.o | 32 | obj-$(CONFIG_SCHED_DEBUG_TRACE) += sched_trace.o |
32 | obj-$(CONFIG_SCHED_OVERHEAD_TRACE) += trace.o | 33 | obj-$(CONFIG_SCHED_OVERHEAD_TRACE) += trace.o |
33 | 34 | ||
34 | obj-$(CONFIG_LITMUS_LOCKING) += aux_tasks.o kfmlp_lock.o | 35 | obj-$(CONFIG_LITMUS_LOCKING) += kfmlp_lock.o |
35 | obj-$(CONFIG_LITMUS_NESTED_LOCKING) += rsm_lock.o ikglp_lock.o | 36 | obj-$(CONFIG_LITMUS_NESTED_LOCKING) += rsm_lock.o ikglp_lock.o |
36 | obj-$(CONFIG_LITMUS_SOFTIRQD) += litmus_softirq.o | 37 | obj-$(CONFIG_LITMUS_SOFTIRQD) += litmus_softirq.o |
37 | obj-$(CONFIG_LITMUS_PAI_SOFTIRQD) += litmus_pai_softirq.o | 38 | obj-$(CONFIG_LITMUS_PAI_SOFTIRQD) += litmus_pai_softirq.o |
diff --git a/litmus/aux_tasks.c b/litmus/aux_tasks.c index 5057137bbbea..b0617accdf7f 100644 --- a/litmus/aux_tasks.c +++ b/litmus/aux_tasks.c | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifdef CONFIG_LITMUS_LOCKING | ||
2 | |||
3 | #include <litmus/sched_plugin.h> | 1 | #include <litmus/sched_plugin.h> |
4 | #include <litmus/trace.h> | 2 | #include <litmus/trace.h> |
5 | #include <litmus/litmus.h> | 3 | #include <litmus/litmus.h> |
4 | |||
5 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
6 | #include <litmus/rt_param.h> | 6 | #include <litmus/rt_param.h> |
7 | #include <litmus/aux_tasks.h> | 7 | #include <litmus/aux_tasks.h> |
8 | 8 | ||
@@ -23,14 +23,11 @@ static int admit_aux_task(struct task_struct *t) | |||
23 | * fail-safe. | 23 | * fail-safe. |
24 | */ | 24 | */ |
25 | struct rt_task tp = { | 25 | struct rt_task tp = { |
26 | //.period = MAGIC_AUX_TASK_PERIOD, | 26 | .period = 1000000, /* 1ms */ |
27 | //.relative_deadline = MAGIC_AUX_TASK_PERIOD, | ||
28 | .period = 1000000, /* has to wait 1 ms before it can run again once it has exhausted budget */ | ||
29 | .relative_deadline = 1000000, | 27 | .relative_deadline = 1000000, |
30 | .exec_cost = 1000000, /* allow full utilization */ | 28 | .exec_cost = 1000000, /* allow full utilization */ |
31 | .phase = 0, | 29 | .phase = 0, |
32 | .cpu = task_cpu(leader), /* take CPU of group leader */ | 30 | .cpu = task_cpu(leader), /* take CPU of group leader */ |
33 | //.budget_policy = NO_ENFORCEMENT, | ||
34 | .budget_policy = QUANTUM_ENFORCEMENT, | 31 | .budget_policy = QUANTUM_ENFORCEMENT, |
35 | .budget_signal_policy = NO_SIGNALS, | 32 | .budget_signal_policy = NO_SIGNALS, |
36 | .cls = RT_CLASS_BEST_EFFORT | 33 | .cls = RT_CLASS_BEST_EFFORT |
@@ -280,7 +277,7 @@ static int aux_task_owner_max_priority_order(struct binheap_node *a, | |||
280 | } | 277 | } |
281 | 278 | ||
282 | 279 | ||
283 | static long __do_enable_slave_non_rt_threads(void) | 280 | static long __do_enable_aux_tasks(void) |
284 | { | 281 | { |
285 | long retval = 0; | 282 | long retval = 0; |
286 | struct task_struct *leader; | 283 | struct task_struct *leader; |
@@ -344,7 +341,7 @@ static long __do_enable_slave_non_rt_threads(void) | |||
344 | return retval; | 341 | return retval; |
345 | } | 342 | } |
346 | 343 | ||
347 | static long __do_disable_slave_non_rt_threads(void) | 344 | static long __do_disable_aux_tasks(void) |
348 | { | 345 | { |
349 | long retval = 0; | 346 | long retval = 0; |
350 | struct task_struct *leader; | 347 | struct task_struct *leader; |
@@ -385,17 +382,17 @@ static long __do_disable_slave_non_rt_threads(void) | |||
385 | return retval; | 382 | return retval; |
386 | } | 383 | } |
387 | 384 | ||
388 | asmlinkage long sys_slave_non_rt_threads(int enable) | 385 | asmlinkage long sys_set_aux_tasks(int enable) |
389 | { | 386 | { |
390 | long retval; | 387 | long retval; |
391 | 388 | ||
392 | read_lock_irq(&tasklist_lock); | 389 | read_lock_irq(&tasklist_lock); |
393 | 390 | ||
394 | if (enable) { | 391 | if (enable) { |
395 | retval = __do_enable_slave_non_rt_threads(); | 392 | retval = __do_enable_aux_tasks(); |
396 | } | 393 | } |
397 | else { | 394 | else { |
398 | retval = __do_disable_slave_non_rt_threads(); | 395 | retval = __do_disable_aux_tasks(); |
399 | } | 396 | } |
400 | 397 | ||
401 | read_unlock_irq(&tasklist_lock); | 398 | read_unlock_irq(&tasklist_lock); |
@@ -405,9 +402,9 @@ asmlinkage long sys_slave_non_rt_threads(int enable) | |||
405 | 402 | ||
406 | #else | 403 | #else |
407 | 404 | ||
408 | asmlinkage long sys_slave_non_rt_tasks(int enable) | 405 | asmlinkage long sys_set_aux_tasks(int enable) |
409 | { | 406 | { |
410 | printk("Unsupported. Recompile with CONFIG_LITMUS_LOCKING.\n"); | 407 | printk("Unsupported. Recompile with CONFIG_REALTIME_AUX_TASKS.\n"); |
411 | return -EINVAL; | 408 | return -EINVAL; |
412 | } | 409 | } |
413 | 410 | ||
diff --git a/litmus/edf_common.c b/litmus/edf_common.c index ca06f6ec103e..7e0d3a5d0c4d 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 | //#ifdef CONFIG_EDF_TIE_BREAK_HASH | 25 | #if defined(CONFIG_EDF_TIE_BREAK_HASH) || defined(CONFIG_REALTIME_AUX_TASKS) |
26 | #include <linux/hash.h> | 26 | #include <linux/hash.h> |
27 | static inline long edf_hash(struct task_struct *t) | 27 | static inline long edf_hash(struct task_struct *t) |
28 | { | 28 | { |
@@ -41,8 +41,9 @@ static inline long edf_hash(struct task_struct *t) | |||
41 | */ | 41 | */ |
42 | return hash_32(hash_32((u32)tsk_rt(t)->job_params.job_no, 32) ^ t->pid, 32); | 42 | return hash_32(hash_32((u32)tsk_rt(t)->job_params.job_no, 32) ^ t->pid, 32); |
43 | } | 43 | } |
44 | //#endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
46 | int aux_tie_break(struct task_struct *first, struct task_struct *second) | 47 | int aux_tie_break(struct task_struct *first, struct task_struct *second) |
47 | { | 48 | { |
48 | long fhash = edf_hash(first); | 49 | long fhash = edf_hash(first); |
@@ -57,6 +58,7 @@ int aux_tie_break(struct task_struct *first, struct task_struct *second) | |||
57 | } | 58 | } |
58 | return 0; | 59 | return 0; |
59 | } | 60 | } |
61 | #endif | ||
60 | 62 | ||
61 | 63 | ||
62 | /* edf_higher_prio - returns true if first has a higher EDF priority | 64 | /* edf_higher_prio - returns true if first has a higher EDF priority |
@@ -75,11 +77,6 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second) | |||
75 | struct task_struct *first_task = first; | 77 | struct task_struct *first_task = first; |
76 | struct task_struct *second_task = second; | 78 | struct task_struct *second_task = second; |
77 | 79 | ||
78 | int first_lo_aux; | ||
79 | int second_lo_aux; | ||
80 | int first_hi_aux; | ||
81 | int second_hi_aux; | ||
82 | |||
83 | /* There is no point in comparing a task to itself. */ | 80 | /* There is no point in comparing a task to itself. */ |
84 | if (first && first == second) { | 81 | if (first && first == second) { |
85 | TRACE_CUR("WARNING: pointless edf priority comparison: %s/%d\n", first->comm, first->pid); | 82 | TRACE_CUR("WARNING: pointless edf priority comparison: %s/%d\n", first->comm, first->pid); |
@@ -93,8 +90,14 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second) | |||
93 | return first && !second; | 90 | return first && !second; |
94 | } | 91 | } |
95 | 92 | ||
96 | #ifdef CONFIG_LITMUS_LOCKING | 93 | #ifdef CONFIG_REALTIME_AUX_TASKS |
94 | { | ||
95 | /* statically prioritize all auxillary tasks that have no inheritance | ||
96 | * below all other regular real-time tasks. | ||
97 | */ | ||
97 | 98 | ||
99 | int first_lo_aux, second_lo_aux; | ||
100 | int first_hi_aux, second_hi_aux; | ||
98 | first_lo_aux = first->rt_param.is_aux_task && !first->rt_param.inh_task; | 101 | first_lo_aux = first->rt_param.is_aux_task && !first->rt_param.inh_task; |
99 | second_lo_aux = second->rt_param.is_aux_task && !second->rt_param.inh_task; | 102 | second_lo_aux = second->rt_param.is_aux_task && !second->rt_param.inh_task; |
100 | 103 | ||
@@ -120,8 +123,10 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second) | |||
120 | TRACE_CUR("hi aux tie break: %s/%d >> %s/%d --- %d\n", first->comm, first->pid, second->comm, second->pid, aux_hi_tie_break); | 123 | TRACE_CUR("hi aux tie break: %s/%d >> %s/%d --- %d\n", first->comm, first->pid, second->comm, second->pid, aux_hi_tie_break); |
121 | return aux_hi_tie_break; | 124 | return aux_hi_tie_break; |
122 | } | 125 | } |
126 | } | ||
127 | #endif | ||
123 | 128 | ||
124 | 129 | #ifdef CONFIG_LITMUS_LOCKING | |
125 | /* Check for EFFECTIVE priorities. Change task | 130 | /* Check for EFFECTIVE priorities. Change task |
126 | * used for comparison in such a case. | 131 | * used for comparison in such a case. |
127 | */ | 132 | */ |
@@ -233,11 +238,13 @@ int edf_higher_prio(struct task_struct* first, struct task_struct* second) | |||
233 | return 1; | 238 | return 1; |
234 | } | 239 | } |
235 | #endif | 240 | #endif |
241 | |||
242 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
243 | /* is this dead code? */ | ||
236 | if (tsk_rt(first)->is_aux_task < tsk_rt(second)->is_aux_task) { | 244 | if (tsk_rt(first)->is_aux_task < tsk_rt(second)->is_aux_task) { |
237 | TRACE_CUR("AUX BREAK!\n"); | ||
238 | return 1; | 245 | return 1; |
239 | } | 246 | } |
240 | 247 | #endif | |
241 | 248 | ||
242 | /* Something could be wrong if you get this far. */ | 249 | /* Something could be wrong if you get this far. */ |
243 | if (unlikely(first->rt_param.inh_task == | 250 | if (unlikely(first->rt_param.inh_task == |
diff --git a/litmus/litmus.c b/litmus/litmus.c index e2bf2a7ad01b..d368202ab8c3 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <litmus/nvidia_info.h> | 25 | #include <litmus/nvidia_info.h> |
26 | #endif | 26 | #endif |
27 | 27 | ||
28 | #ifdef CONFIG_LITMUS_LOCKING | 28 | #ifdef CONFIG_REALTIME_AUX_TASKS |
29 | #include <litmus/aux_tasks.h> | 29 | #include <litmus/aux_tasks.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
@@ -413,7 +413,7 @@ static void reinit_litmus_state(struct task_struct* p, int restore) | |||
413 | /* Cleanup everything else. */ | 413 | /* Cleanup everything else. */ |
414 | memset(&p->rt_param, 0, sizeof(p->rt_param)); | 414 | memset(&p->rt_param, 0, sizeof(p->rt_param)); |
415 | 415 | ||
416 | #ifdef CONFIG_LITMUS_LOCKING | 416 | #ifdef CONFIG_REALTIME_AUX_TASKS |
417 | /* also clear out the aux_data. the !restore case is only called on | 417 | /* also clear out the aux_data. the !restore case is only called on |
418 | * fork (initial thread creation). */ | 418 | * fork (initial thread creation). */ |
419 | if (!restore) | 419 | if (!restore) |
@@ -623,10 +623,6 @@ void litmus_fork(struct task_struct* p) | |||
623 | tsk_rt(p)->ctrl_page = NULL; | 623 | tsk_rt(p)->ctrl_page = NULL; |
624 | 624 | ||
625 | reinit_litmus_state(p, 0); | 625 | reinit_litmus_state(p, 0); |
626 | |||
627 | /* still don't inherit any parental parameters */ | ||
628 | //memset(&p->rt_param, 0, sizeof(p->rt_param)); | ||
629 | //memset(&p->aux_data, 0, sizeof(p->aux_data)); | ||
630 | } | 626 | } |
631 | 627 | ||
632 | /* od tables are never inherited across a fork */ | 628 | /* od tables are never inherited across a fork */ |
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c index 270e06c20bbf..5fc330f14a0e 100644 --- a/litmus/sched_gsn_edf.c +++ b/litmus/sched_gsn_edf.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #ifdef CONFIG_LITMUS_LOCKING | 30 | #ifdef CONFIG_LITMUS_LOCKING |
31 | #include <litmus/kfmlp_lock.h> | 31 | #include <litmus/kfmlp_lock.h> |
32 | #include <litmus/aux_tasks.h> | ||
33 | #endif | 32 | #endif |
34 | 33 | ||
35 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | 34 | #ifdef CONFIG_LITMUS_NESTED_LOCKING |
@@ -41,6 +40,10 @@ | |||
41 | #include <litmus/affinity.h> | 40 | #include <litmus/affinity.h> |
42 | #endif | 41 | #endif |
43 | 42 | ||
43 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
44 | #include <litmus/aux_tasks.h> | ||
45 | #endif | ||
46 | |||
44 | #ifdef CONFIG_LITMUS_SOFTIRQD | 47 | #ifdef CONFIG_LITMUS_SOFTIRQD |
45 | #include <litmus/litmus_softirq.h> | 48 | #include <litmus/litmus_softirq.h> |
46 | #endif | 49 | #endif |
@@ -313,15 +316,15 @@ static noinline void requeue(struct task_struct* task) | |||
313 | BUG_ON(is_queued(task)); | 316 | BUG_ON(is_queued(task)); |
314 | 317 | ||
315 | if (is_released(task, litmus_clock())) { | 318 | if (is_released(task, litmus_clock())) { |
316 | 319 | #ifdef CONFIG_REALTIME_AUX_TASKS | |
317 | if (unlikely(tsk_rt(task)->is_aux_task && !is_running(task))) { | 320 | if (unlikely(tsk_rt(task)->is_aux_task && !is_running(task))) { |
318 | /* aux_task probably transitioned to real-time while it was blocked */ | 321 | /* aux_task probably transitioned to real-time while it was blocked */ |
319 | TRACE_CUR("aux task %s/%d is not ready!\n", task->comm, task->pid); | 322 | TRACE_CUR("aux task %s/%d is not ready!\n", task->comm, task->pid); |
320 | unlink(task); /* really needed? */ | 323 | unlink(task); /* really needed? */ |
321 | } | 324 | } |
322 | else { | 325 | else |
326 | #endif | ||
323 | __add_ready(&gsnedf, task); | 327 | __add_ready(&gsnedf, task); |
324 | } | ||
325 | } | 328 | } |
326 | else { | 329 | else { |
327 | /* it has got to wait */ | 330 | /* it has got to wait */ |
@@ -1046,11 +1049,12 @@ static void gsnedf_task_wake_up(struct task_struct *task) | |||
1046 | set_rt_flags(task, RT_F_RUNNING); | 1049 | set_rt_flags(task, RT_F_RUNNING); |
1047 | #endif | 1050 | #endif |
1048 | 1051 | ||
1052 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
1049 | if (tsk_rt(task)->has_aux_tasks) { | 1053 | if (tsk_rt(task)->has_aux_tasks) { |
1050 | |||
1051 | TRACE_CUR("%s/%d is ready so aux tasks may not inherit.\n", task->comm, task->pid); | 1054 | TRACE_CUR("%s/%d is ready so aux tasks may not inherit.\n", task->comm, task->pid); |
1052 | disable_aux_task_owner(task); | 1055 | disable_aux_task_owner(task); |
1053 | } | 1056 | } |
1057 | #endif | ||
1054 | 1058 | ||
1055 | gsnedf_job_arrival(task); | 1059 | gsnedf_job_arrival(task); |
1056 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); | 1060 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); |
@@ -1067,11 +1071,13 @@ static void gsnedf_task_block(struct task_struct *t) | |||
1067 | 1071 | ||
1068 | unlink(t); | 1072 | unlink(t); |
1069 | 1073 | ||
1074 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
1070 | if (tsk_rt(t)->has_aux_tasks) { | 1075 | if (tsk_rt(t)->has_aux_tasks) { |
1071 | 1076 | ||
1072 | TRACE_CUR("%s/%d is blocked so aux tasks may inherit.\n", t->comm, t->pid); | 1077 | TRACE_CUR("%s/%d is blocked so aux tasks may inherit.\n", t->comm, t->pid); |
1073 | enable_aux_task_owner(t); | 1078 | enable_aux_task_owner(t); |
1074 | } | 1079 | } |
1080 | #endif | ||
1075 | 1081 | ||
1076 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); | 1082 | raw_spin_unlock_irqrestore(&gsnedf_lock, flags); |
1077 | 1083 | ||
@@ -1087,7 +1093,7 @@ static void gsnedf_task_exit(struct task_struct * t) | |||
1087 | gsnedf_change_prio_pai_tasklet(t, NULL); | 1093 | gsnedf_change_prio_pai_tasklet(t, NULL); |
1088 | #endif | 1094 | #endif |
1089 | 1095 | ||
1090 | #ifdef CONFIG_LITMUS_LOCKING | 1096 | #ifdef CONFIG_REALTIME_AUX_TASKS |
1091 | if (tsk_rt(t)->is_aux_task) { | 1097 | if (tsk_rt(t)->is_aux_task) { |
1092 | exit_aux_task(t); /* cannot be called with gsnedf_lock held */ | 1098 | exit_aux_task(t); /* cannot be called with gsnedf_lock held */ |
1093 | } | 1099 | } |
@@ -1096,7 +1102,7 @@ static void gsnedf_task_exit(struct task_struct * t) | |||
1096 | /* unlink if necessary */ | 1102 | /* unlink if necessary */ |
1097 | raw_spin_lock_irqsave(&gsnedf_lock, flags); | 1103 | raw_spin_lock_irqsave(&gsnedf_lock, flags); |
1098 | 1104 | ||
1099 | #ifdef CONFIG_LITMUS_LOCKING | 1105 | #ifdef CONFIG_REALTIME_AUX_TASKS |
1100 | /* make sure we clean up on our way out */ | 1106 | /* make sure we clean up on our way out */ |
1101 | if(tsk_rt(t)->has_aux_tasks) { | 1107 | if(tsk_rt(t)->has_aux_tasks) { |
1102 | disable_aux_task_owner(t); /* must be called witl gsnedf_lock held */ | 1108 | disable_aux_task_owner(t); /* must be called witl gsnedf_lock held */ |
@@ -1209,11 +1215,12 @@ static int __increase_priority_inheritance(struct task_struct* t, | |||
1209 | check_for_preemptions(); | 1215 | check_for_preemptions(); |
1210 | } | 1216 | } |
1211 | 1217 | ||
1212 | 1218 | #ifdef CONFIG_REALTIME_AUX_TASKS | |
1213 | /* propagate to aux tasks */ | 1219 | /* propagate to aux tasks */ |
1214 | if (tsk_rt(t)->has_aux_tasks) { | 1220 | if (tsk_rt(t)->has_aux_tasks) { |
1215 | aux_task_owner_increase_priority(t); | 1221 | aux_task_owner_increase_priority(t); |
1216 | } | 1222 | } |
1223 | #endif | ||
1217 | } | 1224 | } |
1218 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | 1225 | #ifdef CONFIG_LITMUS_NESTED_LOCKING |
1219 | } | 1226 | } |
@@ -1319,10 +1326,13 @@ static int __decrease_priority_inheritance(struct task_struct* t, | |||
1319 | raw_spin_unlock(&gsnedf.release_lock); | 1326 | raw_spin_unlock(&gsnedf.release_lock); |
1320 | } | 1327 | } |
1321 | 1328 | ||
1329 | #ifdef CONFIG_REALTIME_AUX_TASKS | ||
1322 | /* propagate to aux tasks */ | 1330 | /* propagate to aux tasks */ |
1323 | if (tsk_rt(t)->has_aux_tasks) { | 1331 | if (tsk_rt(t)->has_aux_tasks) { |
1324 | aux_task_owner_decrease_priority(t); | 1332 | aux_task_owner_decrease_priority(t); |
1325 | } | 1333 | } |
1334 | #endif | ||
1335 | |||
1326 | #ifdef CONFIG_LITMUS_NESTED_LOCKING | 1336 | #ifdef CONFIG_LITMUS_NESTED_LOCKING |
1327 | } | 1337 | } |
1328 | else { | 1338 | else { |