From fda9a9e4887eff3f0526c7bcef5e29ff511cd4d8 Mon Sep 17 00:00:00 2001 From: Bill Fischofer Date: Tue, 10 Jan 2017 09:59:40 -0600 Subject: linux-generic: pool: defer ring allocation until pool creation To avoid excessive memory overhead for pools, defer the allocation of the pool ring until odp_pool_create() is called. This keeps pool memory overhead proportional to the number of pools actually in use rather than the architected maximum number of pools. This patch addresses Bug https://bugs.linaro.org/show_bug.cgi?id=2765 Signed-off-by: Bill Fischofer Reviewed-by: Petri Savolainen Signed-off-by: Maxim Uvarov --- platform/linux-generic/include/odp_pool_internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform/linux-generic/include/odp_pool_internal.h') diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index 5d7b817e5..4915bdae4 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -69,7 +69,8 @@ typedef struct pool_t { pool_cache_t local_cache[ODP_THREAD_COUNT_MAX]; - pool_ring_t ring; + odp_shm_t ring_shm; + pool_ring_t *ring; } pool_t; -- cgit v1.2.3