diff mbox

[v3,2/4] api: config: increase ODP_SHM_NUM_BLOCKS

Message ID 1424806074-26864-2-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 24, 2015, 7:27 p.m. UTC
Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value should
be related to ODP_CONFIG_POOLS which is 16, define ODP_SHM_NUM_BLOCKS
as (ODP_CONFIG_POOLS * 4)

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 include/odp/api/config.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxim Uvarov Feb. 24, 2015, 9:40 p.m. UTC | #1
number of shm blocks should not depend on number of pools.
application can call odp_shm_reserve() at any time.

Maxim.

On 02/24/2015 10:27 PM, Mike Holmes wrote:
> Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value should
> be related to ODP_CONFIG_POOLS which is 16, define ODP_SHM_NUM_BLOCKS
> as (ODP_CONFIG_POOLS * 4)
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   include/odp/api/config.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
> index 8989fed..b3e8438 100644
> --- a/include/odp/api/config.h
> +++ b/include/odp/api/config.h
> @@ -125,7 +125,7 @@ extern "C" {
>    *
>    * This the the number of separate SHM areas that can be reserved concurrently
>    */
> -#define ODP_SHM_NUM_BLOCKS 32
> +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>   
>   /**
>    * @}
Mike Holmes Feb. 24, 2015, 9:44 p.m. UTC | #2
See v2 conversation will Bill

On 24 February 2015 at 16:40, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> number of shm blocks should not depend on number of pools.
> application can call odp_shm_reserve() at any time.
>
> Maxim.
>
>
> On 02/24/2015 10:27 PM, Mike Holmes wrote:
>
>> Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value should
>> be related to ODP_CONFIG_POOLS which is 16, define ODP_SHM_NUM_BLOCKS
>> as (ODP_CONFIG_POOLS * 4)
>>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>>   include/odp/api/config.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>> index 8989fed..b3e8438 100644
>> --- a/include/odp/api/config.h
>> +++ b/include/odp/api/config.h
>> @@ -125,7 +125,7 @@ extern "C" {
>>    *
>>    * This the the number of separate SHM areas that can be reserved
>> concurrently
>>    */
>> -#define ODP_SHM_NUM_BLOCKS 32
>> +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>>     /**
>>    * @}
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Bill Fischofer Feb. 24, 2015, 9:44 p.m. UTC | #3
That is true, however since each pool requires an implicit
odp_shm_reserve() it's required that this value be >= ODP_CONFIG_POOLS.  I
had suggested that we define it as a multiple of that value for simplicity.

On Tue, Feb 24, 2015 at 3:40 PM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> number of shm blocks should not depend on number of pools.
> application can call odp_shm_reserve() at any time.
>
> Maxim.
>
> On 02/24/2015 10:27 PM, Mike Holmes wrote:
>
>> Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value should
>> be related to ODP_CONFIG_POOLS which is 16, define ODP_SHM_NUM_BLOCKS
>> as (ODP_CONFIG_POOLS * 4)
>>
>> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>> ---
>>   include/odp/api/config.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>> index 8989fed..b3e8438 100644
>> --- a/include/odp/api/config.h
>> +++ b/include/odp/api/config.h
>> @@ -125,7 +125,7 @@ extern "C" {
>>    *
>>    * This the the number of separate SHM areas that can be reserved
>> concurrently
>>    */
>> -#define ODP_SHM_NUM_BLOCKS 32
>> +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>>     /**
>>    * @}
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 24, 2015, 9:48 p.m. UTC | #4
On 02/25/2015 12:44 AM, Bill Fischofer wrote:
> That is true, however since each pool requires an implicit 
> odp_shm_reserve() it's required that this value be >= 
> ODP_CONFIG_POOLS.  I had suggested that we define it as a multiple of 
> that value for simplicity.

+ bunch of functions from odp_init_global call odp_shm_reserve(). Pool * 
4 is not clear values for me. Let it be just 32
or 64.

Maxim.

>
> On Tue, Feb 24, 2015 at 3:40 PM, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     number of shm blocks should not depend on number of pools.
>     application can call odp_shm_reserve() at any time.
>
>     Maxim.
>
>     On 02/24/2015 10:27 PM, Mike Holmes wrote:
>
>         Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value should
>         be related to ODP_CONFIG_POOLS which is 16, define
>         ODP_SHM_NUM_BLOCKS
>         as (ODP_CONFIG_POOLS * 4)
>
>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>         <mailto:mike.holmes@linaro.org>>
>         ---
>           include/odp/api/config.h | 2 +-
>           1 file changed, 1 insertion(+), 1 deletion(-)
>
>         diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>         index 8989fed..b3e8438 100644
>         --- a/include/odp/api/config.h
>         +++ b/include/odp/api/config.h
>         @@ -125,7 +125,7 @@ extern "C" {
>            *
>            * This the the number of separate SHM areas that can be
>         reserved concurrently
>            */
>         -#define ODP_SHM_NUM_BLOCKS 32
>         +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>             /**
>            * @}
>
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Bill Fischofer Feb. 24, 2015, 9:51 p.m. UTC | #5
If we want to make it explicit and not coupled to ODP_CONFIG_POOLS we
should note in the documentation the requirement that this value be >=
ODP_CONFIG_POOLS to avoid surprises.

On Tue, Feb 24, 2015 at 3:48 PM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> On 02/25/2015 12:44 AM, Bill Fischofer wrote:
>
>> That is true, however since each pool requires an implicit
>> odp_shm_reserve() it's required that this value be >= ODP_CONFIG_POOLS.  I
>> had suggested that we define it as a multiple of that value for simplicity.
>>
>
> + bunch of functions from odp_init_global call odp_shm_reserve(). Pool * 4
> is not clear values for me. Let it be just 32
> or 64.
>
> Maxim.
>
>
>> On Tue, Feb 24, 2015 at 3:40 PM, Maxim Uvarov <maxim.uvarov@linaro.org
>> <mailto:maxim.uvarov@linaro.org>> wrote:
>>
>>     number of shm blocks should not depend on number of pools.
>>     application can call odp_shm_reserve() at any time.
>>
>>     Maxim.
>>
>>     On 02/24/2015 10:27 PM, Mike Holmes wrote:
>>
>>         Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value should
>>         be related to ODP_CONFIG_POOLS which is 16, define
>>         ODP_SHM_NUM_BLOCKS
>>         as (ODP_CONFIG_POOLS * 4)
>>
>>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>>         <mailto:mike.holmes@linaro.org>>
>>         ---
>>           include/odp/api/config.h | 2 +-
>>           1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>         diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>>         index 8989fed..b3e8438 100644
>>         --- a/include/odp/api/config.h
>>         +++ b/include/odp/api/config.h
>>         @@ -125,7 +125,7 @@ extern "C" {
>>            *
>>            * This the the number of separate SHM areas that can be
>>         reserved concurrently
>>            */
>>         -#define ODP_SHM_NUM_BLOCKS 32
>>         +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>>             /**
>>            * @}
>>
>>
>>
>>     _______________________________________________
>>     lng-odp mailing list
>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>     http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>
>
Mike Holmes Feb. 24, 2015, 10:02 p.m. UTC | #6
The patch series already adds a static assert, if we are settled I will
hard wire to 64

On 24 February 2015 at 16:51, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> If we want to make it explicit and not coupled to ODP_CONFIG_POOLS we
> should note in the documentation the requirement that this value be >=
> ODP_CONFIG_POOLS to avoid surprises.
>
> On Tue, Feb 24, 2015 at 3:48 PM, Maxim Uvarov <maxim.uvarov@linaro.org>
> wrote:
>
>> On 02/25/2015 12:44 AM, Bill Fischofer wrote:
>>
>>> That is true, however since each pool requires an implicit
>>> odp_shm_reserve() it's required that this value be >= ODP_CONFIG_POOLS.  I
>>> had suggested that we define it as a multiple of that value for simplicity.
>>>
>>
>> + bunch of functions from odp_init_global call odp_shm_reserve(). Pool *
>> 4 is not clear values for me. Let it be just 32
>> or 64.
>>
>> Maxim.
>>
>>
>>> On Tue, Feb 24, 2015 at 3:40 PM, Maxim Uvarov <maxim.uvarov@linaro.org
>>> <mailto:maxim.uvarov@linaro.org>> wrote:
>>>
>>>     number of shm blocks should not depend on number of pools.
>>>     application can call odp_shm_reserve() at any time.
>>>
>>>     Maxim.
>>>
>>>     On 02/24/2015 10:27 PM, Mike Holmes wrote:
>>>
>>>         Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value
>>> should
>>>         be related to ODP_CONFIG_POOLS which is 16, define
>>>         ODP_SHM_NUM_BLOCKS
>>>         as (ODP_CONFIG_POOLS * 4)
>>>
>>>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>>>         <mailto:mike.holmes@linaro.org>>
>>>         ---
>>>           include/odp/api/config.h | 2 +-
>>>           1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>>         diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>>>         index 8989fed..b3e8438 100644
>>>         --- a/include/odp/api/config.h
>>>         +++ b/include/odp/api/config.h
>>>         @@ -125,7 +125,7 @@ extern "C" {
>>>            *
>>>            * This the the number of separate SHM areas that can be
>>>         reserved concurrently
>>>            */
>>>         -#define ODP_SHM_NUM_BLOCKS 32
>>>         +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>>>             /**
>>>            * @}
>>>
>>>
>>>
>>>     _______________________________________________
>>>     lng-odp mailing list
>>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>     http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>>
>>>
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Bill Fischofer Feb. 24, 2015, 10:08 p.m. UTC | #7
Then I'm happy with it.

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>

On Tue, Feb 24, 2015 at 4:02 PM, Mike Holmes <mike.holmes@linaro.org> wrote:

> The patch series already adds a static assert, if we are settled I will
> hard wire to 64
>
> On 24 February 2015 at 16:51, Bill Fischofer <bill.fischofer@linaro.org>
> wrote:
>
>> If we want to make it explicit and not coupled to ODP_CONFIG_POOLS we
>> should note in the documentation the requirement that this value be >=
>> ODP_CONFIG_POOLS to avoid surprises.
>>
>> On Tue, Feb 24, 2015 at 3:48 PM, Maxim Uvarov <maxim.uvarov@linaro.org>
>> wrote:
>>
>>> On 02/25/2015 12:44 AM, Bill Fischofer wrote:
>>>
>>>> That is true, however since each pool requires an implicit
>>>> odp_shm_reserve() it's required that this value be >= ODP_CONFIG_POOLS.  I
>>>> had suggested that we define it as a multiple of that value for simplicity.
>>>>
>>>
>>> + bunch of functions from odp_init_global call odp_shm_reserve(). Pool *
>>> 4 is not clear values for me. Let it be just 32
>>> or 64.
>>>
>>> Maxim.
>>>
>>>
>>>> On Tue, Feb 24, 2015 at 3:40 PM, Maxim Uvarov <maxim.uvarov@linaro.org
>>>> <mailto:maxim.uvarov@linaro.org>> wrote:
>>>>
>>>>     number of shm blocks should not depend on number of pools.
>>>>     application can call odp_shm_reserve() at any time.
>>>>
>>>>     Maxim.
>>>>
>>>>     On 02/24/2015 10:27 PM, Mike Holmes wrote:
>>>>
>>>>         Systems in use require ODP_SHM_NUM_BLOCKS=64 and this value
>>>> should
>>>>         be related to ODP_CONFIG_POOLS which is 16, define
>>>>         ODP_SHM_NUM_BLOCKS
>>>>         as (ODP_CONFIG_POOLS * 4)
>>>>
>>>>         Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>>>>         <mailto:mike.holmes@linaro.org>>
>>>>         ---
>>>>           include/odp/api/config.h | 2 +-
>>>>           1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>>         diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>>>>         index 8989fed..b3e8438 100644
>>>>         --- a/include/odp/api/config.h
>>>>         +++ b/include/odp/api/config.h
>>>>         @@ -125,7 +125,7 @@ extern "C" {
>>>>            *
>>>>            * This the the number of separate SHM areas that can be
>>>>         reserved concurrently
>>>>            */
>>>>         -#define ODP_SHM_NUM_BLOCKS 32
>>>>         +#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
>>>>             /**
>>>>            * @}
>>>>
>>>>
>>>>
>>>>     _______________________________________________
>>>>     lng-odp mailing list
>>>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>>     http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>
>
> --
> *Mike Holmes*
> Linaro  Sr Technical Manager
> LNG - ODP
>
diff mbox

Patch

diff --git a/include/odp/api/config.h b/include/odp/api/config.h
index 8989fed..b3e8438 100644
--- a/include/odp/api/config.h
+++ b/include/odp/api/config.h
@@ -125,7 +125,7 @@  extern "C" {
  *
  * This the the number of separate SHM areas that can be reserved concurrently
  */
-#define ODP_SHM_NUM_BLOCKS 32
+#define ODP_SHM_NUM_BLOCKS (ODP_CONFIG_POOLS * 4)
 
 /**
  * @}