summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-09 15:07:54 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 10:41:44 +0200
commitc5831a3f9af11228dbdaabaf01f69d37e55684ef (patch)
treee9ddedd942f3f31d239820dfc4dbcef4cde0b09a /c/src/lib/libbsp/i386/shared/smp/smp-imps.c
parentrtems: Add task get/set scheduler (diff)
downloadrtems-c5831a3f9af11228dbdaabaf01f69d37e55684ef.tar.bz2
score: Add clustered/partitioned scheduling
Clustered/partitioned scheduling helps to control the worst-case latencies in the system. The goal is to reduce the amount of shared state in the system and thus prevention of lock contention. Modern multi-processor systems tend to have several layers of data and instruction caches. With clustered/partitioned scheduling it is possible to honour the cache topology of a system and thus avoid expensive cache synchronization traffic. We have clustered scheduling in case the set of processors of a system is partitioned into non-empty pairwise-disjoint subsets. These subsets are called clusters. Clusters with a cardinality of one are partitions. Each cluster is owned by exactly one scheduler instance.
Diffstat (limited to 'c/src/lib/libbsp/i386/shared/smp/smp-imps.c')
-rw-r--r--c/src/lib/libbsp/i386/shared/smp/smp-imps.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/c/src/lib/libbsp/i386/shared/smp/smp-imps.c b/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
index 19b23e2631..fdbf915881 100644
--- a/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
+++ b/c/src/lib/libbsp/i386/shared/smp/smp-imps.c
@@ -57,6 +57,7 @@
#include <bsp/smp-imps.h>
#include <bsp/irq.h>
#include <rtems/score/smpimpl.h>
+#include <rtems/score/schedulerimpl.h>
/*
* XXXXX The following absolutely must be defined!!!
@@ -386,7 +387,12 @@ imps_read_config_table(unsigned start, int count)
switch (*((unsigned char *)start)) {
case IMPS_BCT_PROCESSOR:
if ( imps_num_cpus < rtems_configuration_get_maximum_processors() ) {
- add_processor((imps_processor *)start);
+ const Scheduler_Assignment *assignment =
+ _Scheduler_Get_assignment((uint32_t) imps_num_cpus);
+
+ if (_Scheduler_Should_start_processor(assignment)) {
+ add_processor((imps_processor *)start);
+ }
} else
imps_num_cpus++;
start += 12; /* 20 total */