Re: [PATCH 1/2] c-user: Mention per-processor data

2018-09-08 Thread Gedare Bloom
On Fri, Sep 7, 2018 at 9:48 AM, Sebastian Huber
 wrote:
> Close #3507.
> ---
>  c-user/symmetric_multiprocessing_services.rst | 18 ++
>  1 file changed, 18 insertions(+)
>
> diff --git a/c-user/symmetric_multiprocessing_services.rst 
> b/c-user/symmetric_multiprocessing_services.rst
> index 638292b..4204d3f 100644
> --- a/c-user/symmetric_multiprocessing_services.rst
> +++ b/c-user/symmetric_multiprocessing_services.rst
> @@ -791,3 +791,21 @@ from the executing to the heir thread neither the stack 
> of the executing nor
>  the heir thread must be used during interrupt processing.  For this purpose a
>  temporary per-processor stack is set up which may be used by the interrupt
>  prologue before the stack is switched to the interrupt stack.
> +
> +Per-Processor Data
> +--
> +
> +RTMES provides two means for per-processor data:
RTEMS

> +
> +1. Per-processor data which used by RTEMS itself is contained in the
"which used" -> "which is used"

> +   `Per_CPU_Control` structure.  The application configuration via
> +   `` creates a table of these structures
> +   (`_Per_CPU_Information[]`).  The table is dimensioned according to the 
> count
> +   of configured processors
> +   (:ref:`CONFIGURE_MAXIMUM_PROCESSORS `).
> +
> +2. For low level support libraries an API for statically allocated
> +   per-processor data is available via
> +   ` 
> `_.
> +   This API is not intended for general application use.  Please ask on the
> +   development mailing list in case you want to use it.
> --
> 2.13.7
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 2/2] c-user: Mention thread pinning

2018-09-08 Thread Gedare Bloom
On Fri, Sep 7, 2018 at 9:48 AM, Sebastian Huber
 wrote:
> Close #3508.
> ---
>  c-user/symmetric_multiprocessing_services.rst | 18 ++
>  1 file changed, 18 insertions(+)
>
> diff --git a/c-user/symmetric_multiprocessing_services.rst 
> b/c-user/symmetric_multiprocessing_services.rst
> index 4204d3f..4c80cb9 100644
> --- a/c-user/symmetric_multiprocessing_services.rst
> +++ b/c-user/symmetric_multiprocessing_services.rst
> @@ -809,3 +809,21 @@ RTMES provides two means for per-processor data:
> ` 
> `_.
> This API is not intended for general application use.  Please ask on the
> development mailing list in case you want to use it.
> +
> +Thread Pinning
> +--
> +
This is fine, but I think a single sentence to briefly just explain
what pinning is could be helpful at the start of this section, like:
"Thread pinning ensures that a thread is only dispatched to the
processor on which it is pinned."

> +Thread pinning may be used to access per-processor data structures in 
> critical
> +sections with enabled thread dispatching, e.g. a pinned thread is allowed to
> +block.  The `_Thread_Pin()` operation will pin the executing thread to its
> +current processor.  A thread may be pinned recursively, the last unpin 
> request
> +via `_Thread_Unpin()` revokes the pinning.
> +
> +Thread pinning should be used only for short critical sections and not all
> +the time.  Thread pinning is a very low overhead operation in case the
> +thread is not preempted during the pinning.  A preemption will result in
> +scheduler operations to ensure that the thread executes only on its pinned
> +processor.  Thread pinning must be used with care, since it prevents help
> +through the locking protocols.  This makes the :ref:`OMIP ` and
> +:ref:`MrsP ` locking protocols ineffective if pinned threads are
> +involved.
> --
> 2.13.7
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel