Changeset c5831a3f in rtems for cpukit/sapi


Ignore:
Timestamp:
Apr 9, 2014, 1:07:54 PM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
509040f0
Parents:
27270b0d
git-author:
Sebastian Huber <sebastian.huber@…> (04/09/14 13:07:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/15/14 08:41:44)
Message:

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.

Location:
cpukit/sapi/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r27270b0d rc5831a3f  
    821821    const size_t _Scheduler_Count =
    822822      RTEMS_ARRAY_SIZE( _Scheduler_Table );
     823
     824    const Scheduler_Assignment _Scheduler_Assignments[] = {
     825      #if defined(CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS)
     826        CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS
     827      #else
     828        #define CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT \
     829          RTEMS_SCHEDULER_ASSIGN( \
     830            0, \
     831            RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \
     832          )
     833        CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     834        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 2
     835          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     836        #endif
     837        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 3
     838          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     839        #endif
     840        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 4
     841          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     842        #endif
     843        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 5
     844          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     845        #endif
     846        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 6
     847          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     848        #endif
     849        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 7
     850          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     851        #endif
     852        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 8
     853          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     854        #endif
     855        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 9
     856          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     857        #endif
     858        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 10
     859          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     860        #endif
     861        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 11
     862          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     863        #endif
     864        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 12
     865          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     866        #endif
     867        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 13
     868          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     869        #endif
     870        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 14
     871          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     872        #endif
     873        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 15
     874          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     875        #endif
     876        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 16
     877          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     878        #endif
     879        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 17
     880          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     881        #endif
     882        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 18
     883          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     884        #endif
     885        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 19
     886          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     887        #endif
     888        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 20
     889          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     890        #endif
     891        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 21
     892          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     893        #endif
     894        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 22
     895          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     896        #endif
     897        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 23
     898          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     899        #endif
     900        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 24
     901          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     902        #endif
     903        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 25
     904          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     905        #endif
     906        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 26
     907          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     908        #endif
     909        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 27
     910          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     911        #endif
     912        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 28
     913          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     914        #endif
     915        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 29
     916          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     917        #endif
     918        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 30
     919          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     920        #endif
     921        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 31
     922          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     923        #endif
     924        #if CONFIGURE_SMP_MAXIMUM_PROCESSORS >= 32
     925          , CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     926        #endif
     927        #undef CONFIGURE_SMP_SCHEDULER_ASSIGN_OPT
     928      #endif
     929    };
     930
     931    RTEMS_STATIC_ASSERT(
     932      CONFIGURE_SMP_MAXIMUM_PROCESSORS
     933        == RTEMS_ARRAY_SIZE( _Scheduler_Assignments ),
     934      _Scheduler_Assignments
     935    );
    823936  #endif
    824937
  • cpukit/sapi/include/rtems/scheduler.h

    r27270b0d rc5831a3f  
    2626#define RTEMS_SCHEDULER_CONTEXT_NAME( name ) \
    2727  _Configuration_Scheduler_ ## name
     28
     29#if defined(RTEMS_SMP)
     30  /* This object doesn't exist and indicates a configuration error */
     31  extern const Scheduler_Control RTEMS_SCHEDULER_INVALID_INDEX;
     32
     33  #define RTEMS_SCHEDULER_ASSIGN_DEFAULT \
     34    SCHEDULER_ASSIGN_DEFAULT
     35
     36  #define RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL \
     37    SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL
     38
     39  #define RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY \
     40    SCHEDULER_ASSIGN_PROCESSOR_MANDATORY
     41
     42  #define RTEMS_SCHEDULER_ASSIGN( index, attr ) \
     43    { \
     44      ( index ) < RTEMS_ARRAY_SIZE( _Scheduler_Table ) ? \
     45        &_Scheduler_Table[ ( index ) ] : &RTEMS_SCHEDULER_INVALID_INDEX, \
     46      ( attr ) \
     47    }
     48
     49  #define RTEMS_SCHEDULER_ASSIGN_NO_SCHEDULER { NULL, 0 }
     50#endif
    2851
    2952/*
Note: See TracChangeset for help on using the changeset viewer.