Message ID | 1424806074-26864-2-git-send-email-mike.holmes@linaro.org |
---|---|
State | New |
Headers | show |
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) > > /** > * @}
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 >
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 >
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 > >
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 >> >> >> >
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 > >
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 --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) /** * @}
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(-)