aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/litmus.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2011-06-21 01:29:34 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2011-08-27 11:58:39 -0400
commit592eaca1409e55407e980f71b2ec604ca3610ba5 (patch)
tree43cadd8d3f9cc150a7b108696bfabcddcff55650 /litmus/litmus.c
parentfb8d6602af1cbc09115544056b872b976c6349c3 (diff)
Avoid needlessly costly migrations. CONFIG_SCHED_CPU_AFFINITY
Given a choice between several available CPUs (unlinked) on which to schedule a task, let the scheduler select the CPU closest to where that task was previously scheduled. Hopefully, this will reduce cache migration penalties. Notes: SCHED_CPU_AFFINITY is dependent upon x86 (only x86 is supported at this time). Also PFair/PD^2 does not make use of this feature. Signed-off-by: Andrea Bastoni <bastoni@cs.unc.edu>
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r--litmus/litmus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c
index bb8c6c7e9dd1..73af6c3010d6 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -17,6 +17,10 @@
17#include <litmus/litmus_proc.h> 17#include <litmus/litmus_proc.h>
18#include <litmus/sched_trace.h> 18#include <litmus/sched_trace.h>
19 19
20#ifdef CONFIG_SCHED_CPU_AFFINITY
21#include <litmus/affinity.h>
22#endif
23
20/* Number of RT tasks that exist in the system */ 24/* Number of RT tasks that exist in the system */
21atomic_t rt_task_count = ATOMIC_INIT(0); 25atomic_t rt_task_count = ATOMIC_INIT(0);
22static DEFINE_RAW_SPINLOCK(task_transition_lock); 26static DEFINE_RAW_SPINLOCK(task_transition_lock);
@@ -540,6 +544,10 @@ static int __init _init_litmus(void)
540 544
541 init_litmus_proc(); 545 init_litmus_proc();
542 546
547#ifdef CONFIG_SCHED_CPU_AFFINITY
548 init_topology();
549#endif
550
543 return 0; 551 return 0;
544} 552}
545 553