aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/litmus/rt_param.h4
-rw-r--r--include/litmus/unistd_32.h2
-rw-r--r--include/litmus/unistd_64.h6
-rw-r--r--litmus/Kconfig31
-rw-r--r--litmus/Makefile3
-rw-r--r--litmus/aux_tasks.c23
-rw-r--r--litmus/edf_common.c29
-rw-r--r--litmus/litmus.c8
-rw-r--r--litmus/sched_gsn_edf.c26
10 files changed, 90 insertions, 44 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5d1c041be809..d580959f9f5c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1534,7 +1534,9 @@ struct task_struct {
1534 1534
1535 /*** LITMUS RT parameters and state ***/ 1535 /*** LITMUS RT parameters and state ***/
1536 struct rt_param rt_param; 1536 struct rt_param rt_param;
1537#ifdef CONFIG_REALTIME_AUX_TASKS
1537 struct aux_data aux_data; 1538 struct aux_data aux_data;
1539#endif
1538 /*****/ 1540 /*****/
1539 1541
1540 /* references to PI semaphores, etc. */ 1542 /* references to PI semaphores, etc. */
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index c45ba23d7650..8b9e14c461dc 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -285,7 +285,7 @@ struct rt_param {
285#endif 285#endif
286 286
287 287
288#ifdef CONFIG_LITMUS_LOCKING 288#ifdef CONFIG_REALTIME_AUX_TASKS
289 unsigned int is_aux_task:1; 289 unsigned int is_aux_task:1;
290 unsigned int has_aux_tasks:1; 290 unsigned int has_aux_tasks:1;
291 291
@@ -358,12 +358,14 @@ struct rt_param {
358 struct control_page * ctrl_page; 358 struct control_page * ctrl_page;
359}; 359};
360 360
361#ifdef CONFIG_REALTIME_AUX_TASKS
361struct aux_data 362struct aux_data
362{ 363{
363 struct list_head aux_tasks; 364 struct list_head aux_tasks;
364 struct binheap aux_task_owners; 365 struct binheap aux_task_owners;
365 unsigned int initialized:1; 366 unsigned int initialized:1;
366}; 367};
368#endif
367 369
368/* Possible RT flags */ 370/* Possible RT flags */
369#define RT_F_RUNNING 0x00000000 371#define RT_F_RUNNING 0x00000000
diff --git a/include/litmus/unistd_32.h b/include/litmus/unistd_32.h
index 4fd92956d13f..c86b743408ed 100644
--- a/include/litmus/unistd_32.h
+++ b/include/litmus/unistd_32.h
@@ -21,6 +21,6 @@
21#define __NR_litmus_dgl_unlock __LSC(13) 21#define __NR_litmus_dgl_unlock __LSC(13)
22#define __NR_register_nv_device __LSC(14) 22#define __NR_register_nv_device __LSC(14)
23 23
24#define __NR_slave_non_rt_threads _LSC(15) 24#define __NR_set_aux_tasks _LSC(15)
25 25
26#define NR_litmus_syscalls 16 26#define NR_litmus_syscalls 16
diff --git a/include/litmus/unistd_64.h b/include/litmus/unistd_64.h
index abb45c181e8e..3825bc129dbd 100644
--- a/include/litmus/unistd_64.h
+++ b/include/litmus/unistd_64.h
@@ -33,10 +33,10 @@ __SYSCALL(__NR_null_call, sys_null_call)
33__SYSCALL(__NR_litmus_dgl_lock, sys_litmus_dgl_lock) 33__SYSCALL(__NR_litmus_dgl_lock, sys_litmus_dgl_lock)
34#define __NR_litmus_dgl_unlock __LSC(13) 34#define __NR_litmus_dgl_unlock __LSC(13)
35__SYSCALL(__NR_litmus_dgl_unlock, sys_litmus_dgl_unlock) 35__SYSCALL(__NR_litmus_dgl_unlock, sys_litmus_dgl_unlock)
36#define __NR_register_nv_device __LSC(14) 36#define __NR_register_nv_device __LSC(14)
37__SYSCALL(__NR_register_nv_device, sys_register_nv_device) 37__SYSCALL(__NR_register_nv_device, sys_register_nv_device)
38 38
39#define __NR_slave_non_rt_threads __LSC(15) 39#define __NR_set_aux_tasks __LSC(15)
40__SYSCALL(__NR_slave_non_rt_threads, sys_slave_non_rt_threads) 40__SYSCALL(__NR_set_aux_tasks, sys_set_aux_tasks)
41 41
42#define NR_litmus_syscalls 16 42#define NR_litmus_syscalls 16
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
37config 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
37endmenu 68endmenu
38 69
39menu "Real-Time Synchronization" 70menu "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
31obj-$(CONFIG_SCHED_DEBUG_TRACE) += sched_trace.o 32obj-$(CONFIG_SCHED_DEBUG_TRACE) += sched_trace.o
32obj-$(CONFIG_SCHED_OVERHEAD_TRACE) += trace.o 33obj-$(CONFIG_SCHED_OVERHEAD_TRACE) += trace.o
33 34
34obj-$(CONFIG_LITMUS_LOCKING) += aux_tasks.o kfmlp_lock.o 35obj-$(CONFIG_LITMUS_LOCKING) += kfmlp_lock.o
35obj-$(CONFIG_LITMUS_NESTED_LOCKING) += rsm_lock.o ikglp_lock.o 36obj-$(CONFIG_LITMUS_NESTED_LOCKING) += rsm_lock.o ikglp_lock.o
36obj-$(CONFIG_LITMUS_SOFTIRQD) += litmus_softirq.o 37obj-$(CONFIG_LITMUS_SOFTIRQD) += litmus_softirq.o
37obj-$(CONFIG_LITMUS_PAI_SOFTIRQD) += litmus_pai_softirq.o 38obj-$(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
283static long __do_enable_slave_non_rt_threads(void) 280static 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
347static long __do_disable_slave_non_rt_threads(void) 344static 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
388asmlinkage long sys_slave_non_rt_threads(int enable) 385asmlinkage 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
408asmlinkage long sys_slave_non_rt_tasks(int enable) 405asmlinkage 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>
27static inline long edf_hash(struct task_struct *t) 27static 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
46int aux_tie_break(struct task_struct *first, struct task_struct *second) 47int 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 {