From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4F0B2A0C43; Thu, 5 Aug 2021 06:19:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC9AB4014F; Thu, 5 Aug 2021 06:19:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6698540143 for ; Thu, 5 Aug 2021 06:19:23 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17545NWN015978 for ; Wed, 4 Aug 2021 21:19:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=HxyoGKPfZ/J41zLnPgUOR1eyaHsSUWoaXnbUMEMJ5qo=; b=VRdU7XZgulMhOo8mrN4D4S8RC9Z5JxzMbycUzfB19uHfNzMrq3CUxyCQIh+XR+fwr1lq dLL42Ka6/GGZpx6KGY1htQ91ppiVEfYgRB3WZQXjWw7T7Z/gr65w2uq1ZVFyyZ+g0KF7 gdMEohm21AMGisXrDS4w2L/2cbypHAxDxRbukokc+MySVWAkXdxrR7D1q5MqSycoQLNr wWL4Ij3tjEotV8SeI4QnknFM2FXNtpkxI7roENyn1JXIO51lh9mdSxEfVwyj6lNwbG7H mgu+Cgvdo/49xO/vU9eBFTR2aJiknbTr2mzoEnmYqkEQv6TSGEdKcRzefWauxBl/aDT3 Cw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 3a83r50sfe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 04 Aug 2021 21:19:23 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 4 Aug 2021 21:19:21 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Wed, 4 Aug 2021 21:19:21 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 2A34C3F7051; Wed, 4 Aug 2021 21:19:19 -0700 (PDT) From: Shijith Thotton To: CC: Shijith Thotton , , Date: Thu, 5 Aug 2021 09:48:39 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: l0aiSTd31Do4msZSUBDtixhuSjYR8KjX X-Proofpoint-GUID: l0aiSTd31Do4msZSUBDtixhuSjYR8KjX X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-05_01:2021-08-04, 2021-08-05 signatures=0 Subject: [dpdk-dev] [PATCH] event/cnxk: reduce max timer chunk pool cache size X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Reduced max chunk pool cache size from RTE_MEMPOOL_CACHE_MAX_SIZE(512) to 128. If chunk pool cache is empty, it gets filled during arm. Filling 512 entries at a time will fail arm if timeout is shorter. Fixes: 0e792433d051 ("event/cnxk: create and free timer adapter") Signed-off-by: Shijith Thotton --- drivers/event/cnxk/cnxk_tim_evdev.c | 4 ++-- drivers/event/cnxk/cnxk_tim_evdev.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/event/cnxk/cnxk_tim_evdev.c b/drivers/event/cnxk/cnxk_tim_evdev.c index 9d40e336d7..c3e9dc508c 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.c +++ b/drivers/event/cnxk/cnxk_tim_evdev.c @@ -27,8 +27,8 @@ cnxk_tim_chnk_pool_create(struct cnxk_tim_ring *tim_ring, snprintf(pool_name, sizeof(pool_name), "cnxk_tim_chunk_pool%d", tim_ring->ring_id); - if (cache_sz > RTE_MEMPOOL_CACHE_MAX_SIZE) - cache_sz = RTE_MEMPOOL_CACHE_MAX_SIZE; + if (cache_sz > CNXK_TIM_MAX_POOL_CACHE_SZ) + cache_sz = CNXK_TIM_MAX_POOL_CACHE_SZ; cache_sz = cache_sz != 0 ? cache_sz : 2; tim_ring->nb_chunks += (cache_sz * rte_lcore_count()); if (!tim_ring->disable_npa) { diff --git a/drivers/event/cnxk/cnxk_tim_evdev.h b/drivers/event/cnxk/cnxk_tim_evdev.h index c369f6f472..9d95c45a7b 100644 --- a/drivers/event/cnxk/cnxk_tim_evdev.h +++ b/drivers/event/cnxk/cnxk_tim_evdev.h @@ -31,6 +31,7 @@ #define CNXK_TIM_NB_CHUNK_SLOTS(sz) (((sz) / CNXK_TIM_CHUNK_ALIGNMENT) - 1) #define CNXK_TIM_MIN_CHUNK_SLOTS (0x1) #define CNXK_TIM_MAX_CHUNK_SLOTS (0x1FFE) +#define CNXK_TIM_MAX_POOL_CACHE_SZ (128) #define CN9K_TIM_MIN_TMO_TKS (256) -- 2.25.1