| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Resolution is the right term for the documented property.
|
|
|
|
|
|
|
|
|
|
| |
The _Thread_queue_Extract() does not deal with potential priority
updates and the SMP locking protocol handling. Use
_Thread_queue_Continue(). For the POSIX signals processing this is
currently probably unnecessary, however, the use case is similar to the
restart so use the same appoach.
Close #4546.
|
|
|
|
|
|
|
| |
Simplify _Thread_queue_Surrender_no_priority() and use
_Thread_queue_Resume().
Update #4546.
|
|
|
|
|
|
|
| |
Move _Thread_queue_Extract() since this function is not used by the core
services (threads, semaphores, mutexes, message queues).
Update #4546.
|
|
|
|
|
|
|
|
|
|
| |
Remove the THREAD_WAIT_STATE_READY_AGAIN and simply use the initial value to
indicate that a thread does not wait on something. Rename
THREAD_WAIT_FLAGS_INITIAL to THREAD_WAIT_STATE_READY. This change is necessary
so that _Thread_Continue() can be called for threads which never waited on
something (for example dormant threads).
Update #4546.
|
|
|
|
|
|
|
|
| |
Remove _Thread_queue_Extract_with_proxy() and move the proxy extraction
to _Thread_MP_Extract_proxy(). Move similar code blocks of the previous
caller of _Thread_queue_Extract_with_proxy() to helper functions.
Update #4546.
|
|
|
|
|
|
|
| |
The earlier we remove the thread timer the less likely is a superfluous
thread timeout processing.
Update #4546.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SMP EDF scheduler supports a one-to-one and one-to-all thread to
processor affinity. It accepted affinity sets which are a proper
subset of the online processor containing at least two processors owned by
the scheduler. In this case it used a one-to-one thread to processor
affinity. This leads to undefined behaviour if a processor is removed
since the higher level check in rtems_scheduler_remove_processor() does
not account for this implementation detail.
Restrict the affinity set accepted by the SMP EDF scheduler to
1. all online processors, or
2. exactly one processor owned by the scheduler.
Close #4545.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return an error status for the following error condition in
rtems_scheduler_remove_processor():
While an attempt is made to remove a processor from a scheduler, while
the processor is the only processor owned by the scheduler, if a thread
exists which uses the scheduler as a helping scheduler, then the
processor shall not be removed.
The reason is that ask for help requests and withdraw node requests are
processed asynchronously in any order. An ask for help request carried
out on a scheduler without a processor is undefined behaviour.
Update error status description.
Update #4544.
|
|
|
|
|
|
| |
Properly assert that the scheduled chain is not empty. Fix formatting.
Close #4531.
|
|
|
|
|
|
|
|
| |
Process ask for help requests on the current processor. This avoids
using inter-processor interrupts to make the system behaviour a bit more
predictable.
Update #4531.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Update #4531.
|
|
|
|
|
|
|
| |
Move _Scheduler_Unblock_node() into _Scheduler_SMP_Unblock(). This simplifies
the code and makes it easier to review.
Update #4531.
|
|
|
|
|
|
|
| |
Move _Scheduler_Block_node() into _Scheduler_SMP_Block(). This simplifies the
code and makes it easier to review.
Update #4531.
|
|
|
|
|
| |
There is not need to actively ask for help in a yield operation. The helping
is already done on demand by the other scheduler operations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SMP EDF scheduler supports one-to-one and one-to-all thread to
processor affinities. The one-to-one thread to processor affinity
introduces a constraint on the ordering of threads. The implementation
uses one ready queue for threads which have a one-to-all affinity and
one for each one-to-one affinity group. To order threads across the
ready queues, a generation number is used. However, the approach to
update the generation number each time a thread is inserted into a ready
queue was wrong. The generation number needs to be updated only in the
enqueue and enqueue scheduled operations where an insert priority is
available. The scheduled chain needs to take the generation number into
account.
An example scenario which shows the bug is this. Let T be a high
priority task affine to processor X. Let A be a lower priority task
affine to processor X. Let B be a lower priority task with no affinity
to a particular processor which executes on processor Y. Let B be in
the same priority group than A and after A. Let T set the affinity to
all processors. Now A (higher priority relative to B) should execute on
X and T (high priority) should execute on Y.
Close #4534.
|
|
|
|
|
|
| |
This allows to use additional members of the nodes for comparision.
Update #4534.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Update #4531.
|
|
|
|
|
|
|
|
| |
If a node is moved from the scheduled chain to the ready queue, then we
know that it is the highest priority ready node. So, it can be
prepended to the ready queue without doing any comparisons.
Update #4531.
|
|
|
|
|
|
|
|
| |
Rework the handling of the affine ready queue for the EDF SMP scheduler.
Do the queue handling in the node insert, move, and extract operations.
Remove the queue handling from _Scheduler_EDF_SMP_Allocate_processor().
Update #4531.
|
|
|
|
|
|
|
| |
Use the extract from scheduled callback provided by the scheduler
implementation in the SMP scheduler framework.
Update #4531.
|
|
|
|
|
|
| |
The return value was unused. Remove it.
Update #4531.
|
|
|
|
|
|
|
|
| |
Insert nodes after moving the second node to reduce the items in the
data structure for the insert operation. This also avoids having two
nodes for the same processor inserted into the scheduled chain.
Update #4531.
|
|
|
|
| |
Update #4531.
|
|
|
|
| |
Update #4531.
|
|
|
|
|
|
| |
Remove superfluous idle parameter.
Update #4531.
|
|
|
|
|
|
| |
Add the victim node as parameter instead of the idle thread.
Update #4531.
|
|
|
|
|
|
|
|
| |
Do not set the CPU of the idle thread in _Scheduler_Use_idle_thread(). This
helps to use _Scheduler_Try_to_schedule_node() under more general conditions in
the future, for example in case the owner and user of a node are not the same.
Update #4531.
|
|
|
|
|
|
|
| |
Rename _Scheduler_Set_idle_thread() in _Scheduler_Node_set_idle_user() and move
it to <rtems/score/schedulernodeimpl.h>.
Update #4531.
|
|
|
|
|
|
|
| |
These functions are a faster alternative to _RBTree_Insert_inline() if
it is known that the new node is the maximum/minimum node.
Update #4531.
|
|
|
|
|
|
| |
If we block the executing thread and it is not the heir thread, then there is
no need to run the schedule operation. The scheduler already selected a new
heir.
|
|
|
|
|
|
| |
These two OAR copyright headers are the only two in the codebase with
a format that differs from the typical OAR copyright header. This makes
all of the OAR copyright headers consistent.
|
|
|
|
|
|
|
| |
Ensure when both RTEMS_DEBUG is specified and pointers are large that
enough space is allocated to accomodate the Per_CPU_Control structure.
This changes the calculation to be more compositional instead of trying
to list out every permutation of options possible.
|
|
|
|
|
|
| |
These external functions rtems_scheduler_get_processor() and
rtems_scheduler_get_processor_maximum() which may be used by bindings
for languages other than C/C++.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check all IO driver table configuration options which are used to initialize
_IO_Driver_address_table[]. Checks for the following settings were missing:
* CONFIGURE_BSP_PREREQUISITE_DRIVERS
* CONFIGURE_APPLICATION_PREREQUISITE_DRIVERS
* CONFIGURE_APPLICATION_NEEDS_WATCHDOG_DRIVER
* CONFIGURE_APPLICATION_EXTRA_DRIVERS
Update #3875.
|
|
|
|
|
|
|
|
| |
Evaluate CONFIGURE_DISABLE_BSP_SETTINGS for each affected application
configuration option. This makes the code easier to review since the influence
of CONFIGURE_DISABLE_BSP_SETTINGS is locally visible in the code.
Update #3875.
|
|
|
|
| |
Update #4548.
|
|
|
|
| |
Update #4548.
|
|
|
|
| |
Update #4548.
|
|
|
|
|
|
| |
tools can be tested"
This reverts commit d1bbfbea5f60f552b2b3138bb1df35c3372f2461.
|
|
|
|
| |
Update #4527.
|
|
|
|
|
| |
Do not write to the object referenced by old_priority in error paths.
This is in line with other directives.
|
|
|
|
|
|
|
| |
We have to use a second thread queue context to acquire and release the
thread wait lock.
Close #4356.
|
|
|
|
|
|
|
|
|
|
| |
Priority ceiling semaphores (in contrast to MrsP semaphores) have only
one priority ceiling which is defined for the home scheduler of the task
which created the semaphore. Always check during a semaphore seize that
the home scheduler of the calling task is equal to this scheduler.
This avoids a scheduler mismatch if the semphore is acquired after the
calling thread blocked on the semaphore.
|
| |
|