Commit Graph

183 Commits

Author SHA1 Message Date
Sebastian Huber
54406d9f6c Delete CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
This define accidentally re-appeared.
2015-10-15 11:56:15 +02:00
Sebastian Huber
258ad71e96 SMP: Fix and optimize thread dispatching
According to the C11 and C++11 memory models only a read-modify-write
operation guarantees that we read the last value written in modification
order.  Avoid the sequential consistent thread fence and instead use the
inter-processor interrupt to set the thread dispatch necessary
indicator.
2015-09-28 13:56:57 +02:00
Sebastian Huber
8d296cd54e score: Use uintptr_t for atomic pointer operations
Do not obfuscate the standard API.
2015-09-26 21:23:53 +02:00
Sebastian Huber
dafa5d8843 score: Implement priority boosting 2015-09-04 13:26:17 +02:00
Sebastian Huber
3995e6d9c2 score: Implement SMP-specific priority queue 2015-09-04 13:25:03 +02:00
Sebastian Huber
43d7005829 smptests/smpscheduler02: Reduce required CPU count 2015-06-03 09:19:34 +02:00
Sebastian Huber
2c14e67342 smptests/smpmrsp01: Reduce required CPU count 2015-06-03 09:19:34 +02:00
Sebastian Huber
f48b73deb6 smptests/smpscheduler03: Use proper lock 2015-06-03 09:19:34 +02:00
Sebastian Huber
33e30f393e smptests/smpscheduler03: Restructure
Restructure to avoid large maximum thread dispatch disabled times.
2015-05-19 15:14:34 +02:00
Sebastian Huber
900d337f96 score: Rework _Thread_Change_priority()
Move the writes to Thread_Control::current_priority and
Thread_Control::real_priority into _Thread_Change_priority() under the
protection of the thread lock.  Add a filter function to
_Thread_Change_priority() to enable specialized variants.

Avoid race conditions during a thread priority restore with the new
Thread_Control::priority_restore_hint for an important average case
optimizations used by priority inheritance mutexes.

Update #2273.
2015-05-19 12:00:47 +02:00
Sebastian Huber
b1b5ddf028 smptests/smpcache01: Restructure
Restructure to avoid large maximum thread dispatch disabled times.
2015-05-15 13:23:03 +02:00
Sebastian Huber
be0366bb62 score: Fix scheduler helping protocol
Account for priority changes of threads executing in a foreign
partition.  Exchange idle threads in case a victim node uses an idle
thread and the new scheduled node needs an idle thread.
2015-05-11 08:58:40 +02:00
Daniel Cederman
3641320161 smptests/smpcache01: Enable interrupts before waiting for other CPUs
Otherwise there is a risk that a CPU misses a cache manager message
from another CPU and the test hangs.
2015-04-22 09:29:56 +02:00
Sebastian Huber
26c142e5ad score: Refactor SMP cache manager support 2015-04-20 08:23:25 +02:00
Sebastian Huber
e7e86ba65f smpmigration01: Delete timing dependent assert
The cycles per runner depends too heavily on the hardware timing making
the assert unreliable.  Delete runner tasks before we print out the
status.
2015-03-25 11:46:04 +01:00
Sebastian Huber
4f10ed61d0 smptests/smpfatal08: Workaround for QorIQ BSPs 2015-03-24 14:35:05 +01:00
Sebastian Huber
8c7eb0039c testsupport: Add worker setup handler
Add rtems_test_parallel_get_task_id().
2015-03-17 10:32:57 +01:00
Alexander Krutwig
33b72fde61 testsupport: Add cascade option to parallel test 2015-03-06 16:20:20 +01:00
Alexander Krutwig
7f577d3a56 tests: Refactor parallel test execution 2015-03-05 09:12:14 +01:00
Sebastian Huber
c5436ff482 smptests/smpcapture01: Avoid livelock condition 2015-03-04 11:59:45 +01:00
Sebastian Huber
0324410836 smptests: Do not use Giant directly
This ensures that thread dispatching is disabled.  A Giant
acquire/release pair must take place in the same processor.
2015-03-04 07:46:16 +01:00
Sebastian Huber
4e3d9a4d6c score: Make <rtems/score/atomic.h> available
Make <rtems/score/atomic.h> available for all RTEMS configurations.  Use
inline functions instead of macros.  Use ISR disable/enable on
uni-processor configurations to ensure atomicity.

Update #2273.
2015-02-19 10:05:48 +01:00
Sebastian Huber
c34f94f72d score: Add _CPU_SMP_Prepare_start_multitasking()
Update #2268.
2015-02-17 09:41:27 +01:00
Daniel Cederman
8d8573acc8 smpcapture02: Add test of functionality to add custom entries to capture trace 2015-02-11 15:35:26 +01:00
Sebastian Huber
77c5ddd496 smptests/smpmrsp01: Fix task delete race condition
Do not supsend self while waiting for termination since the
rtems_task_delete() may take place while the rtems_task_suspend() waits
for the Giant lock preventing delivery of the inter-processor interrupt.
The result is a suspended and terminated thread (this is a valid state,
but leads in this case to a test failure).
2015-01-14 07:40:49 +01:00
Sebastian Huber
e7d175affb smptests/smpwakeafter01: Fix task count 2015-01-09 14:03:32 +01:00
Sebastian Huber
ad0743db07 smptests/smpmrsp01: Update run indicator only once
On the Freescale T2080 the excessive concurrent write/read lead to a
livelock condition.
2015-01-09 14:03:32 +01:00
Sebastian Huber
864d3475a5 smp: Fix timeout for MrsP semaphores
The previous timeout handling was flawed.  In case a waiting thread
helped out the owner could use the scheduler node indefinitely long.
Update the resource tree in _MRSP_Timeout() to avoid this issue.

Bug reported by Luca Bonato.
2014-12-18 08:33:29 +01:00
Sebastian Huber
1207288022 Update bug report URL 2014-12-05 07:47:32 +01:00
Sebastian Huber
0ff1c29d96 smptests/smpmrsp01: Use busy waits
Use busy waits instead of sleeps to avoid unnecessary switches to the
idle thread.
2014-11-27 10:33:31 +01:00
Sebastian Huber
5bd822a779 smp: Fix scheduler helping protocol
Ensure that scheduler nodes in the SCHEDULER_HELP_ACTIVE_OWNER or
SCHEDULER_HELP_ACTIVE_RIVAL helping state are always
SCHEDULER_SMP_NODE_READY or SCHEDULER_SMP_NODE_SCHEDULED to ensure the
MrsP protocol properties.
2014-11-27 10:33:31 +01:00
Jennifer Averett
39af57c3f7 smp09: Resolve missing prototype warning. 2014-11-25 14:44:59 -06:00
Jennifer Averett
6291e9627e smp07: Resolve missing prototype warning. 2014-11-25 14:44:59 -06:00
Jennifer Averett
2c474a056f smp05: Resolve missing prototype warning. 2014-11-25 14:44:59 -06:00
Jennifer Averett
441dc1c1ad smp02: Resolve unused method warnings. 2014-11-25 14:44:59 -06:00
Jennifer Averett
4375b3b660 smp03: Remove set but not used warning.
Added status validation.
2014-11-25 14:44:59 -06:00
Jennifer Averett
689cba286f smpschedsem01: Remove unused variable warning. 2014-11-25 14:44:59 -06:00
Jennifer Averett
15e371fe67 smpschedaffinity02: Remove unused prototype. 2014-11-25 14:44:59 -06:00
Jennifer Averett
44da98f08f smpcapture01: New test. 2014-11-24 14:04:54 -06:00
Luca Bonato
cceb19f4e5 smp: Fix scheduler helping protocol
New test case for smptests/smpmrsp01.

Fix _Scheduler_Block_node() in case the node is in the
SCHEDULER_HELP_ACTIVE_RIVAL helping state.  For example a
rtems_task_suspend() on a task waiting for a MrsP semaphore.

Fix _Scheduler_Unblock_node() in case the node is in the
SCHEDULER_SMP_NODE_READY state.  For example a rtems_task_resume() on a
task owning or waiting for a MrsP semaphore.
2014-11-24 08:01:15 +01:00
Jennifer Averett
db44590c1d smpschedaffinity05: Change semaphore attributes.
Change semaphore attributes to resolve problem where semaphore is not
released upon a context switch.
2014-11-20 13:47:03 -06:00
Jennifer Averett
1960dcb9b2 smpschedaffinity04: Change semaphore attributes.
Change semaphore attributes to prevent semaphore from being
locked and never released upon a context switch.
2014-11-20 13:47:03 -06:00
Jennifer Averett
bc95f81699 smpschedaffinity02: Change semaphore attributes.
Change semaphore attributes to prevent semaphore from being
locked and never released upon a context switch.
2014-11-20 13:47:03 -06:00
Sebastian Huber
d412e2f025 smptests/smpfatal03: Wait for end of test msg 2014-10-24 09:18:38 +02:00
Sebastian Huber
092b8c57e6 tests/smptests: Normal use of test extension 2014-10-24 07:21:51 +02:00
Sebastian Huber
17889b257c tests/smptests: Use barriers in smpfatal0{12}
Call the test extension explicitly and wait for report output using a
barrier.  This avoids problems with an early shutdown of the system.
2014-10-23 17:15:47 +02:00
Sebastian Huber
8f0a2c995b smptests/smpload01: Report profiling only once
Rely on test extension to report profiling.
2014-09-17 10:31:30 +02:00
Daniel Cederman
6e1206ab46 smptests/smpcache01: Remove invalidation of data cache lines from test
Invalidation of entire data cache might cause data written to the stack
to get lost.
2014-09-16 10:29:42 +02:00
Sebastian Huber
5689d723a8 smptests/smplock01: Update screen file 2014-09-01 16:12:42 +02:00
Sebastian Huber
4030cccfef tests: Add documentation 2014-09-01 11:01:04 +02:00