Commit Graph

391 Commits

Author SHA1 Message Date
Sebastian Huber
252e244e6d smp: Documentation 2015-09-04 13:47:30 +02:00
Sebastian Huber
e1769f2764 smp: Documentation
Close #2274.
2015-09-04 13:44:47 +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
cee82dfb26 smp: Documentation 2015-09-04 13:14:50 +02:00
Sebastian Huber
06496fba0a smp: Documentation 2015-09-04 13:09:17 +02:00
Sebastian Huber
509e8d7f4d rbtree: Delete rtems_rbtree_find_control()
This function is hard to support in alternative implementations.  It has
no internal use case.
2015-09-01 09:07:08 +02:00
Joel Sherrill
add0e494ef user/c_user.texi: Correct info index entry
closes #2380.
2015-08-03 09:34:40 -07:00
Joel Sherrill
3f923fd22e Update date 2015-07-17 09:42:35 -05:00
Sebastian Huber
9154c3f99a doc: Add thread dispatch details for SMP 2015-07-17 11:57:38 +02:00
Sebastian Huber
3bb342ca92 doc: Clarify interrupts disable problems on SMP 2015-07-17 11:57:08 +02:00
Sebastian Huber
b56ddbbd84 doc: Fix SMP task variables section 2015-07-17 09:21:46 +02:00
Sebastian Huber
b9a7dc3b04 doc: Clarify SMP configuration defines 2015-07-08 10:10:27 +02:00
Sebastian Huber
cdf30f0550 rtems: Add rtems_interrupt_local_disable|enable()
Add rtems_interrupt_local_disable|enable() as suggested by Pavel Pisa to
emphasize that interrupts are only disabled on the current processor.
Do not define the rtems_interrupt_disable|enable|flash() macros and
functions on SMP configurations since they don't ensure system wide
mutual exclusion.
2015-06-22 08:40:26 +02:00
Joel Sherrill
e0938c2754 user/conf.t: Fix names for CONFIGURE_UNLIMITED_OBJECTS and CONFIGURE_UNLIMITED_ALLOCATION_SIZE
closes #2368.
2015-06-15 13:22:31 -05:00
Gedare Bloom
fecc911b41 doc: fix typo. closes #2361. 2015-06-09 11:46:23 -04:00
Sebastian Huber
cc18d7bec7 score: Fine grained locking for message queues
Aggregate several critical sections into a bigger one.  Sending and
receiving messages is now protected by an ISR lock.  Thread dispatching
is only disabled in case a blocking operation is necessary.  The message
copy procedure is done inside the critical section (interrupts
disabled).  Thus this change may have a negative impact on the interrupt
latency in case very large messages are transferred.

Update #2273.
2015-05-19 12:00:46 +02:00
Joel Sherrill
3985e75803 user/libpci.t: Make it build and clean up 2015-04-17 09:46:08 -05:00
Daniel Hellstrom
1b645c3f4c LIBPCI: corrected documentation 2015-04-17 01:10:28 +02:00
Daniel Hellstrom
a31845f7f9 LIBPCI: added PCI layer to cpukit/libpci 2015-04-17 01:10:15 +02:00
Gedare Bloom
cf4045630e cpukit: deprecate task variables. closes #2293. 2015-03-10 15:46:59 -04:00
Gedare Bloom
23e43f6af1 cpukit: deprecate rtems_clock_get(). closes #2294. 2015-03-10 13:51:33 -04:00
Gedare Bloom
3ac681191e cpukit: deprecate notepads
Deprecate Classic API Notepads. Mark task_set/get_note() with
the deprecated attribute, and also mark the notepads field.

Replace disable with enable option for notepads in confdefs.h,
and make notepads disabled by default. The previous option
CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS is now unused and
will emit a compile-time warning. A new option
CONFIGURE_ENABLE_CLASSIC_API_NOTEPADS is available to turn
on notepads, but it also will emit a compile-time warning
to indicate that notepads are deprecated.

Closes #2265
2015-03-10 12:53:07 -04:00
Sebastian Huber
f78549221b IMFS: Add CONFIGURE_IMFS_DISABLE_READDIR 2015-02-14 21:34:42 +01:00
Sebastian Huber
249766c53f IMFS: Rename CONFIGURE_IMFS_DISABLE_FCHMOD
Rename CONFIGURE_IMFS_DISABLE_FCHMOD to CONFIGURE_IMFS_DISABLE_CHMOD.
2015-02-13 21:26:17 +01:00
Sebastian Huber
40a18d7f9a IMFS: Add CONFIGURE_IMFS_DISABLE_MKNOD_FILE 2015-02-13 21:11:55 +01:00
Sebastian Huber
12eee4fdb5 IMFS: CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
Resurrect CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM.
2015-02-13 20:53:41 +01:00
Sebastian Huber
a9df916988 IMFS: Add fine grained configuration
Remove miniIMFS.  Statically initialize the root IMFS.

Add configuration options to disable individual
features of the root IMFS, e.g.
  o CONFIGURE_IMFS_DISABLE_CHOWN,
  o CONFIGURE_IMFS_DISABLE_FCHMOD,
  o CONFIGURE_IMFS_DISABLE_LINK,
  o CONFIGURE_IMFS_DISABLE_MKNOD,
  o CONFIGURE_IMFS_DISABLE_MOUNT,
  o CONFIGURE_IMFS_DISABLE_READLINK,
  o CONFIGURE_IMFS_DISABLE_RENAME,
  o CONFIGURE_IMFS_DISABLE_RMNOD,
  o CONFIGURE_IMFS_DISABLE_SYMLINK,
  o CONFIGURE_IMFS_DISABLE_UNMOUNT, and
  o CONFIGURE_IMFS_DISABLE_UTIME.
2015-02-12 20:53:36 +01:00
Joel Sherrill
369328f00f user/conf.t: Fix typo 2015-01-26 16:22:21 -06:00
Gedare Bloom
0a789927c5 doc: add some red-black tree documentation
closes #2059
2014-12-19 12:14:06 -05:00
Sebastian Huber
e4e66d4f16 doc: Clarify rate-monotonic statistics 2014-12-12 15:47:56 +01:00
Sebastian Huber
22cce675ef doc: Clarify rtems_task_set_priority() 2014-12-12 15:39:16 +01:00
Sebastian Huber
01557b0c6e libcsupport: Delete malloc statistics
Use the heap handler statistics instead.  Add heap walk option to MALLOC
shell command.

close #1367
2014-11-28 11:23:53 +01:00
Sebastian Huber
96ec8ee80a rtems: Add more clock tick functions
Add rtems_clock_tick_later(), rtems_clock_tick_later_usec() and
rtems_clock_tick_before().
2014-08-26 10:21:27 +02:00
Sebastian Huber
f553c6ebbe rtems: Inline rtems_clock_get_ticks_since_boot()
Update documentation.
2014-08-25 08:57:36 +02:00
Sebastian Huber
5c3d250959 score: Implement scheduler helping protocol
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.
2014-07-09 10:05:17 +02:00
Sebastian Huber
9553e7a60d score: Use Resource Handler for MrsP semaphores
This enables proper resource dependency tracking and as a side-effect
deadlock detection.
2014-06-03 08:15:16 +02:00
Sebastian Huber
25f5730fe5 score: _Scheduler_Set_affinity()
Do not change the scheduler with this function.  Documentation.  Coding
style.
2014-06-02 08:28:42 +02:00
Sebastian Huber
8fcafdd553 score: Multiprocessor Resource Sharing Protocol
Add basic support for the Multiprocessor Resource Sharing Protocol
(MrsP).

The Multiprocessor Resource Sharing Protocol (MrsP) is defined in A.
Burns and A.J.  Wellings, A Schedulability Compatible Multiprocessor
Resource Sharing Protocol - MrsP, Proceedings of the 25th Euromicro
Conference on Real-Time Systems (ECRTS 2013), July 2013.  It is a
generalization of the Priority Ceiling Protocol to SMP systems.  Each
MrsP semaphore uses a ceiling priority per scheduler instance.  These
ceiling priorities can be specified with rtems_semaphore_set_priority().
A task obtaining or owning a MrsP semaphore will execute with the
ceiling priority for its scheduler instance as specified by the MrsP
semaphore object.  Tasks waiting to get ownership of a MrsP semaphore
will not relinquish the processor voluntarily.  In case the owner of a
MrsP semaphore gets preempted it can ask all tasks waiting for this
semaphore to help out and temporarily borrow the right to execute on one
of their assigned processors.

The help out feature is not implemented with this patch.
2014-05-28 10:50:41 +02:00
Sebastian Huber
e5274df1d9 rtems: Clarify task set/get scheduler parameters 2014-05-20 10:03:35 +02:00
Sebastian Huber
f39f667a69 score: Simplify _Thread_Change_priority()
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.
2014-05-15 12:18:44 +02:00
Sebastian Huber
35a3af7af8 doc: Use @dfn for glossary terms 2014-05-08 08:43:45 +02:00
Sebastian Huber
29e6637eb1 doc: Move SMP glossary to global glossary
Add some terms.
2014-05-08 08:43:45 +02:00
Sebastian Huber
38b59a6d30 score: Implement forced thread migration
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.
2014-05-07 14:26:28 +02:00
Sebastian Huber
e239760f6a score: SMP_FATAL_SCHEDULER_WITHOUT_PROCESSORS
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().
2014-05-05 08:26:27 +02:00
Sebastian Huber
d20b029af9 doc: Add SMP glossary 2014-05-05 08:26:27 +02:00
Ralf Kirchner
0832ca7dc3 doc: Extend documentation for unlimited objects
Mark POSIX Keys and POSIX Key Value Pairs as supported.
Add list of unsupported object classes.
Add hint to unified work areas.
Add example.
2014-04-30 08:29:55 +02:00
Sebastian Huber
fab2f1885c doc: Setting Affinity to a Single Processor 2014-04-22 08:34:45 +02:00
Sebastian Huber
10e613ba52 doc: Typo 2014-04-17 08:06:39 +02:00
Sebastian Huber
f8300293ae doc: rtems_task_set_scheduler() 2014-04-17 08:06:39 +02:00