summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulerstrongapa.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-05-20Update company nameSebastian Huber1-1/+1
The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
2021-11-23score: _Scheduler_SMP_Schedule_highest_ready()Sebastian Huber1-4/+2
Simplify callers of _Scheduler_SMP_Schedule_highest_ready(). Move the node state change and the extraction from scheduled into _Scheduler_SMP_Schedule_highest_ready(). Move the idle thread release to the caller which have more information about the presence of an idle thread. Update #4531.
2021-11-23score: Remove victim thread from CPU allocationSebastian Huber1-7/+3
Update #4531.
2021-11-23score: Rework idle handling in SMP schedulersSebastian Huber1-11/+103
This patch fixes an issue with the idle thread handling in the SMP scheduler framework used for the MrsP locking protocol. The approach to use a simple chain of unused idle threads is broken for schedulers which support thread to processor affinity. The reason is that the thread to processor affinity introduces another ordering indicator which may under certain conditions lead to a reordering of idle threads in the scheduled chain. This reordering is not propagated to the chain of unused idle threads. This could lead to use an idle thread for a sticky scheduler node which is already in use. This locks up the system in infinite loops in the thread context switch procedure. To fix this, the SMP scheduler implementations must now provide callbacks to get and release an unused idle thread. Update #4531.
2021-11-23score: Add SMP scheduler make/clean stickySebastian Huber1-1/+36
This patch fixes the following broken behaviour: While a thread is scheduled on a helping scheduler, while it does not own a MrsP semaphore, if it obtains a MrsP semaphore, then no scheduler node using an idle thread and the ceiling priority of the semaphore is unblocked for the home scheduler. This could lead to priority inversion issues and is not in line with the MrsP protocol. Introduce two new scheduler operations which are only enabled if RTEMS_SMP is defined. The operations are used to make the scheduler node of the home scheduler sticky and to clean the sticky property. This helps to keep the sticky handing out of the frequently used priority update operation. Close #4532.
2021-11-23score: Use extract from scheduled callbacksSebastian Huber1-0/+5
Use the extract from scheduled callback provided by the scheduler implementation in the SMP scheduler framework. Update #4531.
2021-11-23score: Remove return value from enqueue scheduledSebastian Huber1-2/+2
The return value was unused. Remove it. Update #4531.
2021-07-06Fix compiler warnings for schedulerstrongapa.cRichi Dubey1-4/+20
2021-06-24Update Strong APA SchedulerRichi Dubey1-192/+789
This change allows for the migration of higher priority tasks on the arrival of a lower priority task limited by affinity constraints. Change license to BSD-2-Clause according to file history and re-licensing agreement. Update #3053.
2020-12-02score: Canonicalize Doxygen @file commentsSebastian Huber1-1/+9
Use common phrases for the file brief descriptions. Update #3706.
2020-04-16Canonicalize config.h includeSebastian Huber1-2/+2
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2019-04-04doxygen: Rename Score* groups in RTEMSScore*Sebastian Huber1-1/+1
Update #3706
2018-09-03score: Generalize SMP scheduler block supportSebastian Huber1-0/+1
Add extract from scheduled function to the _Scheduler_SMP_Block() operation. This allows a scheduler implementation to do extra work in case a scheduled node is blocked.
2017-11-20score: Optimize scheduler priority updatesSebastian Huber1-121/+55
Thread priority changes may append or prepend the thread to its priority group on the scheduler ready queue. Previously, a separate priority value and a prepend-it flag in the scheduler node were used to propagate a priority change to the scheduler. Now, use an append-it bit in the priority control and reduce the plain priority value to 63 bits. This change leads to a significant code size reduction (about 25%) of the SMP schedulers. The negligible increase of the standard priority scheduler is due to some additional shift operations (SCHEDULER_PRIORITY_MAP() and SCHEDULER_PRIORITY_UNMAP()). Before: text filename 136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o 464 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o 24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o 108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o 292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o 264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o text filename 280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o 488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o 164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o 328 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o text filename 24112 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 37204 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 42236 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o After: text filename 136 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleblock.o 272 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimplechangepriority.o 24 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimple.o 108 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleschedule.o 292 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleunblock.o 264 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulersimpleyield.o text filename 280 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityblock.o 488 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerprioritychangepriority.o 208 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriority.o 164 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityschedule.o 332 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityunblock.o 200 sparc-rtems5/c/erc32/cpukit/score/src/libscore_a-schedulerpriorityyield.o text filename 18860 arm-rtems5/c/imx7/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 28520 sparc-rtems5/c/gr740/cpukit/score/src/libscore_a-scheduleredfsmp.o text filename 32664 powerpc-rtems5/c/qoriq_e6500_32/cpukit/score/src/libscore_a-scheduleredfsmp.o
2017-11-06score: _Chain_Insert_ordered_unprotected()Sebastian Huber1-4/+8
Change the chain order relation to use a directly specified left hand side value. This is similar to _RBTree_Insert_inline() and helps the compiler to better optimize the code.
2017-07-10score: Add simple affinity support to EDF SMPSebastian Huber1-1/+2
Update #3059.
2017-06-29score: Add red-black tree node to Scheduler_NodeSebastian Huber1-7/+7
In SMP configurations, add a red-black tree node to Scheduler_Node to enable an EDF scheduler implementation. Update #3056.
2017-02-03score: Improve scheduler helping protocolSebastian Huber1-4/+4
Only register ask for help requests in the scheduler unblock and yield operations. The actual ask for help operation is carried out during _Thread_Do_dispatch() on a processor related to the thread. This yields a better separation of scheduler instances. A thread of one scheduler instance should not be forced to carry out too much work for threads on other scheduler instances. Update #2556.
2016-11-10rtems: Add scheduler processor add/removeSebastian Huber1-0/+38
Update #2797.
2016-11-02score: Simplify yield and unblock scheduler opsSebastian Huber1-16/+10
Update #2556.
2016-11-02score: Delete unused scheduler ask for help X opSebastian Huber1-16/+0
2016-11-02score: Simplify update priority scheduler opSebastian Huber1-2/+2
Remove unused return status.
2016-11-02score: Add new SMP scheduler helping protocolSebastian Huber1-1/+69
Update #2556.
2016-11-02score: Pass scheduler node to unblock operationSebastian Huber1-1/+3
Changed for consistency with other scheduler operations. Update #2556.
2016-11-02score: Pass scheduler node to block operationSebastian Huber1-1/+3
Changed for consistency with other scheduler operations. Update #2556.
2016-11-02score: Pass scheduler node to yield operationSebastian Huber1-1/+3
Changed for consistency with other scheduler operations. Update #2556.
2016-11-02score: Pass scheduler node to update priority opSebastian Huber1-1/+3
This enables to call this scheduler operation for all scheduler nodes available to a thread. Update #2556.
2016-11-02score: Rename scheduler ask for help stuffSebastian Huber1-2/+2
Rename the scheduler ask for help stuff since this will be replaced step by step with a second generation of the scheduler helping protocol. Keep the old one for now in parallel to reduce the patch set sizes. Update #2556.
2016-09-21score: Rework thread priority managementSebastian Huber1-1/+6
Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
2016-07-01score: Change scheduler node init and destroySebastian Huber1-7/+6
Provide the scheduler node to initialize or destroy to the corresponding operations. This makes it possible to have more than one scheduler node per thread.
2016-06-30score: Strong APA scheduler processor allocationSebastian Huber1-3/+3
Use _Scheduler_SMP_Allocate_processor_exact() to prevent unexpected migrations.
2016-06-22score: Add thread priority to scheduler nodesSebastian Huber1-21/+21
The thread priority is manifest in two independent areas. One area is the user visible thread priority along with a potential thread queue. The other is the scheduler. Currently, a thread priority update via _Thread_Change_priority() first updates the user visble thread priority and the thread queue, then the scheduler is notified if necessary. The priority is passed to the scheduler via a local variable. A generation counter ensures that the scheduler discards out-of-date priorities. This use of a local variable ties the update in these two areas close together. For later enhancements and the OMIP locking protocol implementation we need more flexibility. Add a thread priority information block to Scheduler_Node and synchronize priority value updates via a sequence lock on SMP configurations. Update #2556.
2016-06-14score: _Scheduler_priority_Ready_queue_initializeSebastian Huber1-1/+4
Use priority maximum of scheduler instance. This avoids a potential memory corruption on SMP configurations.
2016-05-02score: Add dummy Strong APA schedulerSebastian Huber1-0/+396
Start with a copy of the Priority SMP scheduler implementation. Update #2510.