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. --- cpukit/sapi/include/rtems/scheduler.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'cpukit/sapi/include/rtems') diff --git a/cpukit/sapi/include/rtems/scheduler.h b/cpukit/sapi/include/rtems/scheduler.h index 06824e9370..ce5455925f 100644 --- a/cpukit/sapi/include/rtems/scheduler.h +++ b/cpukit/sapi/include/rtems/scheduler.h @@ -26,6 +26,29 @@ #define RTEMS_SCHEDULER_CONTEXT_NAME( name ) \ _Configuration_Scheduler_ ## name +#if defined(RTEMS_SMP) + /* This object doesn't exist and indicates a configuration error */ + extern const Scheduler_Control RTEMS_SCHEDULER_INVALID_INDEX; + + #define RTEMS_SCHEDULER_ASSIGN_DEFAULT \ + SCHEDULER_ASSIGN_DEFAULT + + #define RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \ + SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL + + #define RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY \ + SCHEDULER_ASSIGN_PROCESSOR_MANDATORY + + #define RTEMS_SCHEDULER_ASSIGN( index, attr ) \ + { \ + ( index ) < RTEMS_ARRAY_SIZE( _Scheduler_Table ) ? \ + &_Scheduler_Table[ ( index ) ] : &RTEMS_SCHEDULER_INVALID_INDEX, \ + ( attr ) \ + } + + #define RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER { NULL, 0 } +#endif + /* * This file should be only included in the context of . * Define the scheduler configuration macros only in case the corresponding -- cgit v1.2.3