From c5831a3f9af11228dbdaabaf01f69d37e55684ef Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 9 Apr 2014 15:07:54 +0200 Subject: 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. --- c/src/lib/libbsp/i386/shared/smp/smp-imps.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'c/src/lib/libbsp/i386/shared/smp/smp-imps.c') 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 #include #include +#include /* * 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 */ -- cgit v1.2.3