summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-251-181/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* score: Use Processor_mask instead of cpu_set_tSebastian Huber2017-11-061-2/+2
|
* score: Remove CPU_set_ControlSebastian Huber2017-10-111-2/+3
| | | | | | Use Processor_mask instead. Update #2514.
* score: Add scheduler node to set affinity opSebastian Huber2017-07-071-0/+1
| | | | Update #3059.
* score: Use processor mask for set affinitySebastian Huber2017-07-071-4/+2
| | | | Update #3059.
* score: Move processor affinity to Thread_ControlSebastian Huber2017-07-071-19/+0
| | | | Update #3059.
* score: Improve scheduler helping protocolSebastian Huber2017-02-031-1/+1
| | | | | | | | | | | 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.
* rtems: Add scheduler processor add/removeSebastian Huber2016-11-101-0/+12
| | | | Update #2797.
* score: Simplify yield and unblock scheduler opsSebastian Huber2016-11-021-1/+1
| | | | Update #2556.
* score: Delete unused scheduler ask for help X opSebastian Huber2016-11-021-7/+0
|
* score: Simplify update priority scheduler opSebastian Huber2016-11-021-7/+1
| | | | Remove unused return status.
* score: Add new SMP scheduler helping protocolSebastian Huber2016-11-021-0/+22
| | | | Update #2556.
* score: Pass scheduler node to unblock operationSebastian Huber2016-11-021-9/+2
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to block operationSebastian Huber2016-11-021-9/+2
| | | | | | Changed for consistency with other scheduler operations. Update #2556.
* score: Pass scheduler node to update priority opSebastian Huber2016-11-021-1/+2
| | | | | | | This enables to call this scheduler operation for all scheduler nodes available to a thread. Update #2556.
* score: Rename scheduler ask for help stuffSebastian Huber2016-11-021-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.
* score: Indroduce cancel job scheduler operationSebastian Huber2016-08-041-0/+1
| | | | | Do not use a deadline value of zero to indicate a job cancellation. Use a dedicated scheduler operation for this.
* score: Change scheduler node init and destroySebastian Huber2016-07-011-1/+3
| | | | | | 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.
* score: Add thread priority to scheduler nodesSebastian Huber2016-06-221-10/+7
| | | | | | | | | | | | | | | | | | 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.
* score: Introduce map priority scheduler operationSebastian Huber2016-06-221-0/+2
| | | | | | | | | | | Introduce map/unmap priority scheduler operations to map thread priority values from/to the user domain to/from the scheduler domain. Use the map priority operation to validate the thread priority. The EDF schedulers use this new operation to distinguish between normal priorities and priorities obtain through a job release. Update #2173. Update #2556.
* score: Delete unused _Scheduler_Priority_compare()Sebastian Huber2016-06-221-1/+0
| | | | | By convention, thread priorities must be integers in RTEMS. Smaller values represent more important threads.
* Fix even more Doxygen issuesJoel Sherrill2015-03-061-1/+1
|
* score: Implement scheduler helping protocolSebastian Huber2014-07-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The following scheduler operations return a thread in need for help - unblock, - change priority, and - yield. A thread in need for help is a thread that encounters a scheduler state change from scheduled to ready or a thread that cannot be scheduled in an unblock operation. Such a thread can ask threads which depend on resources owned by this thread for help. Add a new ask for help scheduler operation. This operation is used by _Scheduler_Ask_for_help() to help threads in need for help returned by the operations mentioned above. This operation is also used by _Scheduler_Thread_change_resource_root() in case the root of a resource sub-tree changes. A use case is the ownership change of a resource. In case it is not possible to schedule a thread in need for help, then the corresponding scheduler node will be placed into the set of ready scheduler nodes of the scheduler instance. Once a state change from ready to scheduled happens for this scheduler node it may be used to schedule the thread in need for help.
* score: Need for help indicator for scheduler opsSebastian Huber2014-07-081-2/+2
| | | | | | | | | | | | | Return a thread in need for help for the following scheduler operations - unblock, - change priority, and - yield. A thread in need for help is a thread that encounters a scheduler state change from scheduled to ready or a thread that cannot be scheduled in an unblock operation. Such a thread can ask threads which depend on resources owned by this thread for help.
* Add SMP Priority Scheduler with AffinityJoel Sherrill2014-06-111-12/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This scheduler attempts to account for needed thread migrations caused as a side-effect of a thread state, affinity, or priority change operation. This scheduler has its own allocate_processor handler named _Scheduler_SMP_Allocate_processor_exact() because _Scheduler_SMP_Allocate_processor() attempts to prevent an executing thread from moving off its current CPU without considering affinity. Without this, the scheduler makes all the right decisions and then they are discarded at the end. ==Side Effects of Adding This Scheduler== Added Thread_Control * parameter to Scheduler_SMP_Get_highest_ready type so methods looking for the highest ready thread can filter by the processor on which the thread blocking resides. This allows affinity to be considered. Simple Priority SMP and Priority SMP ignore this parameter. + Added get_lowest_scheduled argument to _Scheduler_SMP_Enqueue_ordered(). + Added allocate_processor argument to the following methods: - _Scheduler_SMP_Block() - _Scheduler_SMP_Enqueue_scheduled_ordered() - _Scheduler_SMP_Enqueue_scheduled_ordered() + schedulerprioritysmpimpl.h is a new file with prototypes for methods which were formerly static in schedulerprioritysmp.c but now need to be public to be shared with this scheduler. NOTE: _Scheduler_SMP_Get_lowest_ready() appears to have a path which would allow it to return a NULL. Previously, _Scheduler_SMP_Enqueue_ordered() would have asserted on it. If it cannot return a NULL, _Scheduler_SMP_Get_lowest_ready() should have an assertions.
* score: Rename _Scheduler_Update()Sebastian Huber2014-06-041-1/+1
| | | | | | Rename _Scheduler_Update() to _Scheduler_Update_priority(). Add parameter for the new thread priority to avoid direct usage of Thread_Control::current_priority in the scheduler operation.
* score: Replace _Scheduler_Allocate/Free()Sebastian Huber2014-06-041-3/+3
| | | | | | | | Replace _Scheduler_Allocate() with _Scheduler_Node_initialize(). Remove the return status and thus the node initialization must be always successful. Rename _Scheduler_Free() to _Scheduler_Node_destroy().
* score: Add and use _Scheduler_SMP_Start_idle()Sebastian Huber2014-05-151-1/+1
|
* score: Add and use _Scheduler_default_Schedule()Sebastian Huber2014-05-151-1/+1
|
* score: Simplify _Thread_Change_priority()Sebastian Huber2014-05-151-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | The function to change a thread priority was too complex. Simplify it with a new scheduler operation. This increases the average case performance due to the simplified logic. The interrupt disabled critical section is a bit prolonged since now the extract, update and enqueue steps are executed atomically. This should however not impact the worst-case interrupt latency since at least for the Deterministic Priority Scheduler this sequence can be carried out with a wee bit of instructions and no loops. Add _Scheduler_Change_priority() to replace the sequence of - _Thread_Set_transient(), - _Scheduler_Extract(), - _Scheduler_Enqueue(), and - _Scheduler_Enqueue_first(). Delete STATES_TRANSIENT, _States_Is_transient() and _Thread_Set_transient() since this state is now superfluous. With this change it is possible to get rid of the SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the implementation of the new SMP locking protocols.
* score: Introduce scheduler nodesSebastian Huber2014-05-141-10/+5
| | | | | | | | | | | | Rename scheduler per-thread information into scheduler nodes using Scheduler_Node as the base type. Use inheritance for specialized schedulers. Move the scheduler specific states from the thread control block into the scheduler node structure. Validate the SMP scheduler node state transitions in case RTEMS_DEBUG is defined.
* score: Scheduler documentationSebastian Huber2014-05-141-1/+1
|
* score: Simplify thread control initializationSebastian Huber2014-04-151-2/+2
| | | | | | | | | | | The thread control block contains fields that point to application configuration dependent memory areas, like the scheduler information, the API control blocks, the user extension context table, the RTEMS notepads and the Newlib re-entrancy support. Account for these areas in the configuration and avoid extra workspace allocations for these areas. This helps also to avoid heap fragementation and reduces the per thread memory due to a reduced heap allocation overhead.
* score: Static scheduler configurationSebastian Huber2014-04-151-10/+10
| | | | | | Do not allocate the scheduler control structures from the workspace. This is a preparation step for configuration of clustered/partitioned schedulers on SMP.
* schedulerpriorityaffinitysmp.h: Fix compilation error introduced by recent ↵Joel Sherrill2014-04-041-2/+6
| | | | changes
* score: Add scheduler control to scheduler opsSebastian Huber2014-04-041-6/+10
| | | | | Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
* score: Delete superfluous fieldSebastian Huber2014-04-041-5/+0
|
* score: Add priority affinity smp scheduler.Jennifer Averett2014-04-031-0/+144