aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2010-12-01 16:07:47 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2010-12-01 16:07:47 -0500
commit7c4bf1537a81a84954dc34caeaf3b874800f7c18 (patch)
treee8d1bf719eccb3a3c82feeb919207b164ebaa2a9 /litmus
parent1b9caf2f95c97e27c91372bd41f79d3e96a99e62 (diff)
parentf07bb0a4549916107a7619d0bc4cb5dc09d5744a (diff)
Merge branch 'wip-merge-2.6.36' of ssh://cvs.cs.unc.edu/cvs/proj/litmus/repo/litmus2010 into wip-merge-2.6.36
Diffstat (limited to 'litmus')
-rw-r--r--litmus/Kconfig15
-rw-r--r--litmus/litmus.c7
-rw-r--r--litmus/sched_cedf.c3
3 files changed, 23 insertions, 2 deletions
diff --git a/litmus/Kconfig b/litmus/Kconfig
index d62c417f261e..a2f267870f29 100644
--- a/litmus/Kconfig
+++ b/litmus/Kconfig
@@ -174,6 +174,21 @@ config SCHED_DEBUG_TRACE_SHIFT
174 character device node should be created at /dev/litmus/log. The buffer 174 character device node should be created at /dev/litmus/log. The buffer
175 can be flushed using cat, e.g., 'cat /dev/litmus/log > my_log_file.txt'. 175 can be flushed using cat, e.g., 'cat /dev/litmus/log > my_log_file.txt'.
176 176
177config SCHED_DEBUG_TRACE_CALLER
178 bool "Include [function@file:line] tag in TRACE() log"
179 depends on SCHED_DEBUG_TRACE
180 default n
181 help
182 With this option enabled, TRACE() prepends
183
184 "[<function name>@<filename>:<line number>]"
185
186 to each message in the debug log. Enable this to aid in figuring out
187 what was called in which order. The downside is that it adds a lot of
188 clutter.
189
190 If unsure, say No.
191
177endmenu 192endmenu
178 193
179endmenu 194endmenu
diff --git a/litmus/litmus.c b/litmus/litmus.c
index 0756d0156f8f..8efd3f9ef7ee 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -382,7 +382,8 @@ void litmus_exit_task(struct task_struct* tsk)
382/* IPI callback to synchronize plugin switching */ 382/* IPI callback to synchronize plugin switching */
383static void synch_on_plugin_switch(void* info) 383static void synch_on_plugin_switch(void* info)
384{ 384{
385 while (atomic_read(&cannot_use_plugin)) 385 atomic_inc(&cannot_use_plugin);
386 while (atomic_read(&cannot_use_plugin) > 0)
386 cpu_relax(); 387 cpu_relax();
387} 388}
388 389
@@ -403,6 +404,10 @@ int switch_sched_plugin(struct sched_plugin* plugin)
403 /* send IPI to force other CPUs to synch with us */ 404 /* send IPI to force other CPUs to synch with us */
404 smp_call_function(synch_on_plugin_switch, NULL, 0); 405 smp_call_function(synch_on_plugin_switch, NULL, 0);
405 406
407 /* wait until all other CPUs have started synch */
408 while (atomic_read(&cannot_use_plugin) < num_online_cpus())
409 cpu_relax();
410
406 /* stop task transitions */ 411 /* stop task transitions */
407 raw_spin_lock_irqsave(&task_transition_lock, flags); 412 raw_spin_lock_irqsave(&task_transition_lock, flags);
408 413
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c
index 111e4fb1c62b..8c9513d33f59 100644
--- a/litmus/sched_cedf.c
+++ b/litmus/sched_cedf.c
@@ -708,7 +708,8 @@ static long cedf_activate_plugin(void)
708 if (cpumask_test_cpu(cpu, cedf[j].cpu_map)) 708 if (cpumask_test_cpu(cpu, cedf[j].cpu_map))
709 break; 709 break;
710 /* if it is in a cluster go to next cpu */ 710 /* if it is in a cluster go to next cpu */
711 if (cpumask_test_cpu(cpu, cedf[j].cpu_map)) 711 if (j < num_clusters &&
712 cpumask_test_cpu(cpu, cedf[j].cpu_map))
712 continue; 713 continue;
713 714
714 /* this cpu isn't in any cluster */ 715 /* this cpu isn't in any cluster */