[PATCH] sp13: Document message buffer usage and adjust configuration

Gedare Bloom gedare at rtems.org
Wed Apr 15 19:48:11 UTC 2015


On Wed, Apr 15, 2015 at 3:46 PM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
>
>
> On 4/15/2015 2:45 PM, Gedare Bloom wrote:
>> On Wed, Apr 15, 2015 at 3:41 PM, Joel Sherrill
>> <joel.sherrill at oarcorp.com> wrote:
>>> ---
>>>  testsuites/sptests/sp13/system.h | 23 +++++++++++++++++++----
>>>  1 file changed, 19 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/testsuites/sptests/sp13/system.h b/testsuites/sptests/sp13/system.h
>>> index 3b170bf..8e5ffbb 100644
>>> --- a/testsuites/sptests/sp13/system.h
>>> +++ b/testsuites/sptests/sp13/system.h
>>> @@ -66,13 +66,28 @@ TEST_EXTERN rtems_name Queue_name[ 4 ];      /* array of queue names */
>>>  #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
>>>
>>>  /*
>>> - *  First three created in init.c, last created in task1.c.
>>> + *  Created in init.c:
>>> + *    Q1 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) (1600)
>>> + *    Q2 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 10, MESSAGE_SIZE )   (160)
>>> + *    Q3 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) (1600)
>>> + *
>>> + *  Q1 and Q2 deleted in task1.c
>>> + *
>>> + *  Q1 recreated in task1.c
>>> + *    Q1 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, 20 )           (2000)
>>> + *
>>> + *  Q1 deleted again in task1.c.
>>> + *  Q1 repeatedly created and deleted for 2 messages of 1-1030 bytes
>>> + *  in length
>>> + *    Q1 - CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 1030, 2 )           (2000)
>>> + *
>>> + *  Thus the peak message memory needed is technically only:
>>> + *      Q3 + third instance of Q1 at peak of two 1030 byte messages.
>>> + *
>>>   */
>>>  #define CONFIGURE_MESSAGE_BUFFER_MEMORY \
>>>     CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) + \
>>> -   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 10, MESSAGE_SIZE ) + \
>>> -   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, MESSAGE_SIZE ) + \
>>> -   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 100, 20 )
>>> +   CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( 1030, 2 )
>> Should be ( 2, 1030 )
> Yep. Good catch. Is the comment clear?

A bit verbose but good enough for posterity.



More information about the devel mailing list