Changes between Version 66 and Version 67 of Developer/SMP


Ignore:
Timestamp:
Apr 18, 2014, 12:30:26 AM (6 years ago)
Author:
Mayes
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Developer/SMP

    v66 v67  
    122122=  Low-Level Start  =
    123123
    124 == Status ==
     124= Status =
    125125
    126126
     
    130130
    131131[wiki:File:rtems-smp-low-level-states.png File:rtems-smp-low-level-states.png]
    132 == Future Directions ==
     132= Future Directions =
    133133
    134134
     
    136136=  Processor Affinity  =
    137137
    138 ==  Status  ==
     138=  Status  =
    139139
    140140
     
    142142
    143143The APIs for <sys/cpuset.h>, pthread affinity, and Classic API task affinity have been community reviewed and patches have been posted. The current work is "data complete" in that one can get and set using the APIs but no scheduler currently supports affinity.
    144 ==  Background  ==
     144=  Background  =
    145145
    146146
     
    161161
    162162Work remains to be done on adding affinity to a new SMP Scheduler variant. The current plan calls for having the schedulers without affinity ignore input on a set affinity operation and return a cpu set with all CPUs set on all get affinity operations. A new SMP scheduler variant will be added to support affinity. Initially, this scheduler will only be sufficient to properly manage the thread's CPU set as a data element. Then an assignment algorithm will be added.
    163 ==  Theory  ==
     163=  Theory  =
    164164
    165165
     
    253253=  Atomic Operations  =
    254254
    255 ==  Status  ==
     255=  Status  =
    256256
    257257
     
    321321        .size   release, .-release
    322322        .ident  "GCC: (GNU) 4.9.0 20130917 (experimental)"
    323 ==  Future Directions  ==
     323=  Future Directions  =
    324324
    325325
     
    328328=  SMP Locks  =
    329329
    330 ==  Status  ==
     330=  Status  =
    331331
    332332
    333333SMP locks are implemented as a ticket lock using CPU architecture specific atomic operations.  The SMP locks use a local context to be able to use scalable lock implementations like the Mellor-Crummey and Scotty (MCS) queue-based locks.
    334 ==  Future Directions  ==
     334=  Future Directions  =
    335335
    336336
     
    338338=  ISR Locks  =
    339339
    340 ==  Status  ==
     340=  Status  =
    341341
    342342
     
    347347on single processor configurations.  On SMP configurations they use an SMP lock
    348348to ensure mutual exclusion throughout the system.
    349 ==  Future Directions  ==
     349=  Future Directions  =
    350350
    351351
     
    354354=  Giant Lock vs. Fine Grained Locking  =
    355355
    356 ==  Status  ==
     356=  Status  =
    357357
    358358
     
    381381likely lead to undesirable high worst case latencies which linear increase with
    382382the processor count <ref name="Brandenburg2011">[https://www.cs.unc.edu/~anderson/diss/bbbdiss.pdf Björn B. Brandenburg, Scheduling and Locking in Multiprocessor Real-Time Operating Systems, 2011.]</ref>.
    383 ==  Future Directions  ==
     383=  Future Directions  =
    384384
    385385
     
    421421=  Watchdog Handler  =
    422422
    423 ==  Status  ==
     423=  Status  =
    424424
    425425
     
    427427RTEMS.  It is a core service of the operating system and used by the high level APIs.  It is used for time of day maintenance and time events based on ticks or
    428428wall clock time for example.  The term ''watchdog'' has nothing to do with hardware watchdogs.
    429 ==  Future Directions  ==
     429=  Future Directions  =
    430430
    431431
     
    435435=  Per-CPU Control  =
    436436
    437 ==  Status  ==
     437=  Status  =
    438438
    439439
     
    443443code.  CPU ports can add custom fields to the per-CPU control.  This is used on
    444444SPARC for the ISR dispatch disable indication.
    445 ==  Future Directions  ==
     445=  Future Directions  =
    446446
    447447
     
    449449=  Interrupt Support  =
    450450
    451 ==  Status  ==
     451=  Status  =
    452452
    453453
    454454The interrupt support is BSP specific in general.
    455 ==  Future Directions  ==
     455=  Future Directions  =
    456456
    457457
     
    460460=  Global Scheduler  =
    461461
    462 ==  Status  ==
     462=  Status  =
    463463
    464464
     
    466466 *  Basic SMP support for schedulers like processor allocation and extended thread state information.
    467467 *  Two global fixed priority schedulers (G-FP) are available with SMP support.
    468 ==  Future Directions  ==
     468=  Future Directions  =
    469469
    470470
     
    477477=  Clustered Scheduling  =
    478478
    479 ==  Status  ==
     479=  Status  =
    480480
    481481
    482482Clustered scheduling is not supported.
    483 ==  Future Directions  ==
     483=  Future Directions  =
    484484
    485485
     
    512512=  Task Variables  =
    513513
    514 ==  Status  ==
     514=  Status  =
    515515
    516516
     
    519519of the executing thread.  For Newlib the access to the re-entrancy structure is
    520520now performed via ''__getreent()'',  see also ''__DYNAMIC_REENT__'' in Newlib.  The POSIX keys and the POSIX once function are now available for all RTEMS configurations (they no longer depend on POSIX enabled).  Task variables have been replaced with POSIX keys for the RTEMS shell, the file system environment and the C++ support.
    521 ==  Future Directions  ==
     521=  Future Directions  =
    522522
    523523
     
    525525=  Non-Preempt Mode for Mutual Exclusion  =
    526526
    527 ==  Status  ==
     527=  Status  =
    528528
    529529
     
    532532a mode change request is issued.  The alternatives are mutexes and condition
    533533variables.
    534 ==  Future Directions  ==
     534=  Future Directions  =
    535535
    536536
     
    541541=  Thread Restart  =
    542542
    543 ==  Status  ==
     543=  Status  =
    544544
    545545
    546546The restart of threads is implemented.
    547 ==  Future Directions  ==
     547=  Future Directions  =
    548548
    549549
     
    572572=  Thread Delete  =
    573573
    574 ==  Status  ==
     574=  Status  =
    575575
    576576
    577577Deletion of threads is implemented.
    578 ==  Future Directions  ==
     578=  Future Directions  =
    579579
    580580
     
    582582=  Semaphores and Mutexes  =
    583583
    584 ==  Status  ==
     584=  Status  =
    585585
    586586
     
    588588configurations this first acquires the Giant lock and then interrupts are
    589589disabled.
    590 ==  Future Directions  ==
     590=  Future Directions  =
    591591
    592592
    593593Use an ISR lock per object to improve the performance for uncontested
    594594operations.  See also [wiki:#Giant_Lock_vs._Fine_Grained_Locking Giant Lock vs. Fine Grained Locking].
    595 = Implementations =
     595=  Implementations =
    596596
    597597=  Tool Chain  =
    598598
    599 ==  Binutils  ==
     599=  Binutils  =
    600600
    601601
    602602A Binutils 2.24 or later release must be used due to the LEON3 support.
    603 ==  GCC  ==
     603=  GCC  =
    604604
    605605
    606606A GCC 4.8 2013-11-25 (e.g. 4.8.3) or later must be used due to the LEON3 support.  The LEON3 support for GCC includes a proper C11 memory model definition for this processor and C11 atomic operations using the CAS instruction.  The backport of the LEON3 support was initiated by EB [http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02255.html].
    607 ==  GDB  ==
     607=  GDB  =
    608608
    609609
     
    611611=  Profiling  =
    612612
    613 ==  Reason  ==
     613=  Reason  =
    614614
    615615
     
    617617observability requirements.  Vital timing data can be gathered on a per object
    618618basis through profiling.
    619 ==  RTEMS API Changes  ==
     619=  RTEMS API Changes  =
    620620
    621621
    622622None.
    623 ==  High-Performance CPU Counters  ==
     623=  High-Performance CPU Counters  =
    624624
    625625
     
    650650  */
    651651 uint64_t _CPU_counter_To_nanoseconds( CPU_counter counter )
    652 ==  SMP Lock Profiling  ==
     652=  SMP Lock Profiling  =
    653653
    654654
     
    774774  */
    775775 void _SMP_lock_Iterate( SMP_lock_Visitor visitor, void *arg );
    776 ==  Interrupt and Thread Profiling  ==
     776=  Interrupt and Thread Profiling  =
    777777
    778778
     
    859859   Per_CPU_Stats Stats;
    860860 };
    861 ==  Status  ==
     861=  Status  =
    862862
    863863
     
    865865=  Interrupt Support  =
    866866
    867 ==  Reason  ==
     867=  Reason  =
    868868
    869869
     
    871871system.  In combination with partitioned/clustered scheduling this can reduce
    872872the amount of inter-processor synchronization and thread migrations.
    873 ==  RTEMS API Changes  ==
     873=  RTEMS API Changes  =
    874874
    875875
     
    927927=  Clustered Scheduling  =
    928928
    929 ==  Reason  ==
     929=  Reason  =
    930930
    931931
     
    936936scheduling it is possible to honor the cache topology of a system and thus
    937937avoid expensive cache synchronization traffic.
    938 ==  RTEMS API Changes  ==
     938=  RTEMS API Changes  =
    939939
    940940
     
    10651065   rtems_id *scheduler_id
    10661066 );
    1067 ==  Scheduler Configuration  ==
     1067=  Scheduler Configuration  =
    10681068
    10691069
     
    11571157configuration approach enables an additional error source which is avoided by
    11581158the processor configuration table.
    1159 ==  Scheduler Implementation  ==
     1159=  Scheduler Implementation  =
    11601160
    11611161
     
    12031203all dependencies explicit and easier to access (allows more efficient machine
    12041204code).
    1205 ==  Status  ==
     1205=  Status  =
    12061206
    12071207
     
    12091209=  Multiprocessor Resource Sharing Protocol - MrsP  =
    12101210
    1211 ==  Reason  ==
     1211=  Reason  =
    12121212
    12131213
     
    12361236Feature (a) prevents lower-priority threads from running in preference to the waiting higher-priority thread and stealing resources that it might want to use in the future as part of the current execution; should that stealing happen, the blocking penalty potentially suffered on access to global resources would skyrocket to untenable levels.
    12371237Feature (b), which brings in the sole welcome extent of migration in the proposed model, which is useful when higher-priority tasks running on the processor of the global resource prevent it from completing execution; in that case, the slack allowed for by local spinning on other processors where other threads are waiting, is used to speed up the completion of the execution in the global resource and therefore reduce blocking.
    1238 ==  RTEMS API Changes  ==
     1238=  RTEMS API Changes  =
    12391239
    12401240
     
    12821282   size_t priority_ceilings_count
    12831283 );
    1284 ==  Implementation  ==
     1284=  Implementation  =
    12851285
    12861286
     
    12931293=  Fine Grained Locking  =
    12941294
    1295 ==  Reason  ==
     1295=  Reason  =
    12961296
    12971297
     
    13051305the operating system state is distributed allowing true parallelism of
    13061306independent components.
    1307 ==  RTEMS API Changes  ==
     1307=  RTEMS API Changes  =
    13081308
    13091309
    13101310None.
    1311 ==  Locking Protocol Analysis  ==
     1311=  Locking Protocol Analysis  =
    13121312
    13131313
     
    14871487to the mutex SMP lock.  Later mutex timeout or release operations can then get
    14881488the waiting thread and deal with it accordingly.
    1489 ==  Implementation  ==
     1489=  Implementation  =
    14901490
    14911491
     
    15031503The thread queue operations must no longer use internal locks (e.g. ISR
    15041504disable/enable).  This simplifies them considerable.  The thread queue
    1505 operations must be pe
     1505operations must be performed under the SMP lock of the object.  The drawback is
     1506that the time of disabled interrupts increases.  Th