| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Replace the simple processor count with the processor set owned by the
scheduler instance.
Update #3059.
|
|
|
|
|
|
|
|
| |
Implement the Processor_mask via <sys/bitset.h>. Provide
_Processor_mask_To_uint32_t() to enable its use in device specific
routines, e.g. interrupt affinity register in an interrupt controller.
Update #3059.
|
| |
|
|
|
|
|
|
|
|
| |
Rename _Scheduler_Assignments into _Scheduler_Initial_assignments to
make it clear that they may not reflect the run-time scheduler
assignment.
Update #2797.
|
|
|
|
|
|
|
| |
This makes it possible to adjust the scheduler of a processor at
run-time.
Update #2797.
|
|
|
|
| |
Update #2556.
|
|
|
|
|
| |
This enables fatal extensions to continue program execution after some
fatal errors.
|
|
|
|
|
|
|
|
| |
According to the C11 standard only atomic read-modify-write operations
guarantee that the last value written in modification order is read, see
"7.17.3 Order and consistency". Thus we must use a read-modify-write in
_SMP_Inter_processor_interrupt_handler() to make sure we read an
up-to-date message.
|
|
|
|
| |
Update #2555.
|
|
|
|
|
|
|
|
|
| |
Use a red-black tree instead of delta chains.
Close #2344.
Update #2554.
Update #2555.
Close #2606.
|
|
|
|
| |
Update #2554.
|
|
|
|
|
|
|
|
|
| |
The use case for this is the Cortex-A9 MPCore which has per-processor
registers (only accessible by a particular processor) for the global
timer used by the clock driver. This might be useful for other drivers
as well.
Update #2554.
|
| |
|
| |
|
|
|
|
|
| |
Rename Per_CPU_Control::started into Per_CPU_Control::online to match
standard nomenclature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delete SCORE_INIT. This finally removes the
some.h:
#ifndef SOME_XYZ_EXTERN
#define SOME_XYZ_EXTERN extern
#endif
SOME_XYZ_EXTERN type xyz;
some_xyz.c:
#define SOME_XYZ_EXTERN
#include <some.h>
pattern in favour of
some.h:
extern type xyz;
some_xyz.c
#include <some.h>
type xyz;
Update #2559.
|
|
|
|
| |
The problem is that empty structures have a different size in C and C++.
|
| |
|
| |
|
|
|
|
| |
Change message type to unsigned long to match other SMP message functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not use the Per_CPU_Control::started in
_SMP_Start_multitasking_on_secondary_processor() since this field may be
not up to date when a secondary processor reads it. Use the read-only
scheduler assignment instead.
Add a new fatal error SMP_FATAL_MULTITASKING_START_ON_INVALID_PROCESSOR.
This prevents out-of-bounds access.
It is currently not possible to test these fatal errors. One option
would be to fake values of the _CPU_SMP_Get_current_processor(), but
unfortunately this function is inline on some architectures.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current implementation of task migration in RTEMS has some
implications with respect to the interrupt latency. It is crucial to
preserve the system invariant that a task can execute on at most one
processor in the system at a time. This is accomplished with a boolean
indicator in the task context. The processor architecture specific
low-level task context switch code will mark that a task context is no
longer executing and waits that the heir context stopped execution
before it restores the heir context and resumes execution of the heir
task. So there is one point in time in which a processor is without a
task. This is essential to avoid cyclic dependencies in case multiple
tasks migrate at once. Otherwise some supervising entity is necessary to
prevent life-locks. Such a global supervisor would lead to scalability
problems so this approach is not used. Currently the thread dispatch is
performed with interrupts disabled. So in case the heir task is
currently executing on another processor then this prolongs the time of
disabled interrupts since one processor has to wait for another
processor to make progress.
It is difficult to avoid this issue with the interrupt latency since
interrupts normally store the context of the interrupted task on its
stack. In case a task is marked as not executing we must not use its
task stack to store such an interrupt context. We cannot use the heir
stack before it stopped execution on another processor. So if we enable
interrupts during this transition we have to provide an alternative task
independent stack for this time frame. This issue needs further
investigation.
|
|
|
|
|
| |
A default handler is not necessary. The test message sender must ensure
that a handler is installed.
|
| |
|
|
|
|
|
| |
This handler can be used to test the inter-processor interrupt
implementation.
|
|
|
|
|
| |
Avoid the SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS fatal error and make it
a run-time error in rtems_scheduler_ident() and _Scheduler_Get_by_id().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use "cpu" for an arbitrary Per_CPU_Control variable.
Use "cpu_self" for the Per_CPU_Control of the current processor.
Use "cpu_index" for an arbitrary processor index.
Use "cpu_index_self" for the processor index of the current processor.
Use "cpu_count" for the processor count obtained via
_SMP_Get_processor_count().
Use "cpu_max" for the processor maximum obtained by
rtems_configuration_get_maximum_processors().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add and use _CPU_SMP_Start_processor(). Add and use
_CPU_SMP_Finalize_initialization(). This makes most
_CPU_SMP_Initialize() functions a bit simpler since we can calculate the
minimum value of the count of processors requested by the application
configuration and the count of physically or virtually available
processors in the high-level code.
The CPU port has now the ability to signal a processor start failure.
With the support for clustered/partitioned scheduling the presence of
particular processors can be configured to be optional or mandatory.
There will be a fatal error only in case mandatory processors are not
present.
The CPU port may use a timeout to monitor the start of a processor.
|
| |
|
|
|
|
|
|
|
|
| |
Add _Debug_Is_thread_dispatching_allowed(). This makes it possible to
assert the opposite.
Use _ISR_Disable_without_giant()/_ISR_Enable_without_giant() to avoid
misleading secondary assertion failures.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a local context structure to the SMP lock API for acquire and
release pairs. This context can be used to store the ISR level and
profiling information. It may be later used to enable more
sophisticated lock algorithms, e.g. MCS locks.
There is only one lock that cannot be used with a local context. This
is the per-CPU lock since here we would have to transfer the local
context through a context switch which is very complicated.
|
|
|
|
| |
New test smptests/smpfatal03.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename _SMP_Request_other_cores_to_perform_first_context_switch() into
_SMP_Request_start_multitasking() since this requests now a multitasking
start on all configured and available processors. The name corresponds
_Thread_Start_multitasking() and
_SMP_Start_multitasking_on_secondary_processor() actions issued in
response to this request. Move in source file to right place.
Rename PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING into
PER_CPU_STATE_READY_TO_START_MULTITASKING.
Rename PER_CPU_STATE_BEGIN_MULTITASKING into
PER_CPU_STATE_REQUEST_START_MULTITASKING.
Rename _SMP_Request_other_cores_to_shutdown() into
_SMP_Request_shutdown().
Add a per-CPU state lock to protect all changes. This was necessary to
offer a controlled shutdown of the system (atomic read/writes alone are
not sufficient for this kind of synchronization).
Add documentation for Per_CPU_State.
Delete debug output.
New tests smptests/smpfatal01 and smptests/smpfatal02.
|
|
|
|
|
| |
Inline _SMP_Inter_processor_interrupt_handler() to avoid function call
overhead. Remove debug output.
|
|
|
|
|
|
| |
Wait for per-CPU changes into PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING
later. There is no need to delay the initialization of the main
processor at this point.
|
| |
|
| |
|
|
|
|
|
|
| |
Rename rtems_smp_process_interrupt() into
_SMP_Inter_processor_interrupt_handler(). Delete unused header file
<rtems/bspsmp.h>.
|
|
|
|
|
|
| |
Rename rtems_smp_secondary_cpu_initialize() into
_SMP_Start_multitasking_on_secondary_processor(). Move declaration to
<rtems/score/smpimpl.h>.
|
|
|
|
|
| |
Collect SMP implementation specific parts in the
<rtems/score/smpimpl.h> header file.
|
|
|
|
|
|
| |
Since the per-CPU SMP lock must be acquired and released to send the
message a single interrupt broadcast operations offers no benefits. If
synchronization is required, then a SMP barrier must be used anyway.
|
|
|
|
|
| |
Rename bsp_smp_initialize() into _CPU_SMP_Initialize() since every CPU
port must supply this function.
|
|
|
|
|
| |
Rename RTEMS_BSP_SMP_SHUTDOWN in SMP_MESSAGE_SHUTDOWN since SMP messages
have nothing to do with the BSP. Use UINT32_C() instead of casts.
|
|
|
|
|
|
| |
Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in
SMP configurations since this allows intervention of BSP or application
specific fatal extensions.
|
|
|
|
|
|
| |
Move _SMP_Request_other_cores_to_shutdown() invocation from
rtems_shutdown_executive() to _Internal_error_Occurred() to allow a
proper shutdown on SMP configurations even in the error case.
|