aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-07-01 10:45:20 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-07-01 10:45:20 -0400
commit9b070bc6b676c62d4988da8699f0a731e733b318 (patch)
treea672d1b726cdce756f9a67786f0262cca776d3fe /litmus
parent0291b7547359c8e01ca1146ca8f2d5f321338ff8 (diff)
make inclusion of SRP support optional2008.1
we can disable it to improve performance when it is not needed
Diffstat (limited to 'litmus')
-rw-r--r--litmus/Kconfig19
-rw-r--r--litmus/litmus.c3
-rw-r--r--litmus/sched_psn_edf.c2
-rw-r--r--litmus/srp.c22
4 files changed, 37 insertions, 9 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig
index 0b8e348554..9a2ab90dec 100644
--- a/litmus/Kconfig
+++ b/litmus/Kconfig
@@ -1,28 +1,39 @@
1menu "LITMUS^RT" 1menu "LITMUS^RT"
2 2
3menu "Real-Time Synchronization"
4
3config NP_SECTION 5config NP_SECTION
4 bool "Non-preemptive section support" 6 bool "Non-preemptive section support"
5 depends on !SPARC64 7 depends on !SPARC64
6 default y 8 default n
7 help 9 help
8 Include support for flag-based non-preemptive section signaling 10 Include support for flag-based non-preemptive section signaling
9 from userspace. 11 from userspace.
10 12
11 (currently broken on SPARC64) 13 (currently broken on SPARC64)
12 14
13 Say Yes if in doubt. 15 Say Yes if you want FMLP short critical section synchronization support.
14 16
15 17
18config SRP
19 bool "Stack Resource Policy (SRP)"
20 default n
21 help
22 Include support for Baker's Stack Resource Policy.
23
24 Say Yes if you want FMLP local long critical section synchronization support.
25
16config FMLP 26config FMLP
17 bool "FMLP support" 27 bool "FMLP support"
18 depends on NP_SECTION 28 depends on NP_SECTION
19 default y 29 default n
20 help 30 help
21 Include support for deterministic multiprocessor real-time 31 Include support for deterministic multiprocessor real-time
22 synchronization support. 32 synchronization support.
23 33
24 Say Yes if in doubt. 34 Say Yes if you want FMLP long critical section synchronization support.
25 35
36endmenu
26 37
27menu "Tracing" 38menu "Tracing"
28 39
diff --git a/litmus/litmus.c b/litmus/litmus.c
index 852559468d..979985e4a3 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -132,9 +132,6 @@ asmlinkage long sys_get_rt_task_param(pid_t pid, struct rt_task __user * param)
132 132
133} 133}
134 134
135/* implemented in kernel/litmus_sem.c */
136void srp_ceiling_block(void);
137
138/* 135/*
139 * This is the crucial function for periodic task implementation, 136 * This is the crucial function for periodic task implementation,
140 * It checks if a task is periodic, checks if such kind of sleep 137 * It checks if a task is periodic, checks if such kind of sleep
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c
index 50fc95d749..0e9c9dd80a 100644
--- a/litmus/sched_psn_edf.c
+++ b/litmus/sched_psn_edf.c
@@ -416,7 +416,9 @@ static long psnedf_admit_task(struct task_struct* tsk)
416/* Plugin object */ 416/* Plugin object */
417static struct sched_plugin psn_edf_plugin __cacheline_aligned_in_smp = { 417static struct sched_plugin psn_edf_plugin __cacheline_aligned_in_smp = {
418 .plugin_name = "PSN-EDF", 418 .plugin_name = "PSN-EDF",
419#ifdef CONFIG_SRP
419 .srp_active = 1, 420 .srp_active = 1,
421#endif
420 .tick = psnedf_tick, 422 .tick = psnedf_tick,
421 .task_new = psnedf_task_new, 423 .task_new = psnedf_task_new,
422 .complete_job = complete_job, 424 .complete_job = complete_job,
diff --git a/litmus/srp.c b/litmus/srp.c
index cbad091d48..6e670f9138 100644
--- a/litmus/srp.c
+++ b/litmus/srp.c
@@ -12,6 +12,8 @@
12#include <litmus/trace.h> 12#include <litmus/trace.h>
13 13
14 14
15#ifdef CONFIG_SRP
16
15struct srp_priority { 17struct srp_priority {
16 struct list_head list; 18 struct list_head list;
17 unsigned int period; 19 unsigned int period;
@@ -164,7 +166,7 @@ struct fdso_ops srp_sem_ops = {
164}; 166};
165 167
166 168
167void do_srp_down(struct srp_semaphore* sem) 169static void do_srp_down(struct srp_semaphore* sem)
168{ 170{
169 /* Update ceiling. */ 171 /* Update ceiling. */
170 srp_add_prio(&__get_cpu_var(srp), &sem->ceiling); 172 srp_add_prio(&__get_cpu_var(srp), &sem->ceiling);
@@ -173,7 +175,7 @@ void do_srp_down(struct srp_semaphore* sem)
173 TRACE_CUR("acquired srp 0x%p\n", sem); 175 TRACE_CUR("acquired srp 0x%p\n", sem);
174} 176}
175 177
176void do_srp_up(struct srp_semaphore* sem) 178static void do_srp_up(struct srp_semaphore* sem)
177{ 179{
178 /* Determine new system priority ceiling for this CPU. */ 180 /* Determine new system priority ceiling for this CPU. */
179 WARN_ON(!in_list(&sem->ceiling.list)); 181 WARN_ON(!in_list(&sem->ceiling.list));
@@ -298,3 +300,19 @@ void srp_ceiling_block(void)
298 preempt_enable(); 300 preempt_enable();
299} 301}
300 302
303
304#else
305
306asmlinkage long sys_srp_down(int sem_od)
307{
308 return -ENOSYS;
309}
310
311asmlinkage long sys_srp_up(int sem_od)
312{
313 return -ENOSYS;
314}
315
316struct fdso_ops srp_sem_ops = {};
317
318#endif