First, should this patch be a part of a series with a cover letter subject "Avoid shm namespace collisions and allow shm block per queue". Now everything is just separate patches - including the cover letter. Please, use format-patch command to create the series.
> -----Original Message----- > From: lng-odp [mailto:[email protected]] On Behalf Of Kevin > Wang > Sent: Friday, April 07, 2017 9:41 AM > To: [email protected] > Cc: Kevin Wang <[email protected]> > Subject: [lng-odp] [PATCH] Use different name to create pool and queue > > Scalable scheduler requires to allocate shm memory for each queue. > This patch is to avoid shm namespace collisions and allow shm block > per queue. > > Signed-off-by: Kevin Wang <[email protected]> > Reviewed-by: Ola Liljedahl <[email protected]> > Reviewed-by: Brian Brooks <[email protected]> > Reviewed-by: Honnappa Nagarahalli <[email protected]> > --- > .../linux-generic/include/odp_config_internal.h | 2 +- > .../api/classification/odp_classification_basic.c | 8 ++--- > .../classification/odp_classification_test_pmr.c | 42 +++++++++++------ > ----- > test/common_plat/validation/api/timer/timer.c | 5 ++- > 4 files changed, 30 insertions(+), 27 deletions(-) > > diff --git a/platform/linux-generic/include/odp_config_internal.h > b/platform/linux-generic/include/odp_config_internal.h > index e7d84c9..a262d2e 100644 > --- a/platform/linux-generic/include/odp_config_internal.h > +++ b/platform/linux-generic/include/odp_config_internal.h > @@ -104,7 +104,7 @@ extern "C" { > * > * This the the number of separate SHM areas that can be reserved > concurrently > */ > -#define ODP_CONFIG_SHM_BLOCKS (ODP_CONFIG_POOLS + 48) > +#define ODP_CONFIG_SHM_BLOCKS (ODP_CONFIG_POOLS + ODP_CONFIG_QUEUES + 48) Cannot do this. Today the number of queues is 1K. That already leads to unnecessary large number of SHM blocks. Now, what if some user needs 1M queues. Number of SHM blocks gets even higher. All other ODP SW blocks do allocate only one or few SHM blocks for their usage. What makes this even worse is that SHM blocks are mapped to hugepages which maybe 2MB, or even 1GB depending on the system configuration. Already 1k x 1GB hugepage mapping would be a overkill / failure. Change your scheduler to allocate only a few SHM blocks. > > /* > * Maximum event burst size > diff --git > a/test/common_plat/validation/api/classification/odp_classification_basic. > c > b/test/common_plat/validation/api/classification/odp_classification_basic. > c > index 9817287..b5b9285 100644 > --- > a/test/common_plat/validation/api/classification/odp_classification_basic. > c > +++ > b/test/common_plat/validation/api/classification/odp_classification_basic. > c > @@ -93,10 +93,10 @@ void classification_test_create_pmr_match(void) > configure_default_cos(pktio, &default_cos, > &default_queue, &default_pool); > > - queue = queue_create("pmr_match", true); > + queue = queue_create("pmr_match_queue", true); Why you care about queue names in other SW blocks? Names for queues are debugging information and a matter of taste. You should not change those, if not really needed. -Petri
