From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3E61FA0513; Wed, 15 Jan 2020 12:48:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C50081C116; Wed, 15 Jan 2020 12:48:01 +0100 (CET) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id 10BC91C115 for ; Wed, 15 Jan 2020 12:48:00 +0100 (CET) Received: by mail-il1-f193.google.com with SMTP id v15so14601947iln.0 for ; Wed, 15 Jan 2020 03:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1EpQfv2Qmp/XGwMpAfWUJi0xENFUsOMlEy5c9MyxWYY=; b=BX22s/ZA3gLt5mqUpoVW2XVDlvE/Cfn5JKHLvCFGIbAIUVzdGnV2f61HWVEbH4RDJI hQHmmqEDVBoLOdnSEGvjT/MAxzp2XqTLozjHJhIckpOpNa+wblTvZw783Sk6tUWeu/m7 rr9SBHapEtlwtOqVEHa5IHM+W4FXMRE/Z5ulQEHSqPaT8M2235/3q5S+3OTvIcyx7I34 mK7/K4f5Arks1ne/gFMUVz0MN+74M634uGolZzCB5HAFXMhsjh5IWXj6s0ofx8tQ2dm8 6Na2jJ4cYmbGUz2NspAb69XMe1cq7D8TiOkvS8tuXr2FQdMHX/tJ2KJoPO740D3odIVN 66gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1EpQfv2Qmp/XGwMpAfWUJi0xENFUsOMlEy5c9MyxWYY=; b=JZ9gbZOpKgie6nAlCgwPiskVnocTXRCdHU3+Rb9wItTW42RoU9cb77/V+25k0DpqOR TnWDNG0ZI+lD/HFszQQed2JIILm6VM8vO/DvDeLhLtIsK8LFkQbDC9tUSykqLLGtPXPI I1omtv7mGrkk/FZGeZSwcgnx7a8oahhOxRI9i16Gs1UlJRMWg2/XC8WpZMeJMDWlgyjm NTZIOCJtuMhQjL7O9FucpbweZ+5glfxz7gfnJADDozCktp8Lk1yKk+w9GAMdcGZuNy1R fcXm4IAcT2M5sm4ttTmRobJ4HIHBPzqxuwQmMKEfui6I6AM1PD7NVhPQEHoMiLxLpIjI hUyw== X-Gm-Message-State: APjAAAWjE67pjKtYtQyDyf6yfdE3PJWemV4DLgGIVbR7jKn6jKGqozfg DBQtKylYlogt3uM9uv0CvDQ4jLV+LEkbD3+Kh4E= X-Google-Smtp-Source: APXvYqw1fwIQcMgtJtvMlXq6X6p+zAPh3wkb4Z52vj50mAmH5xUXrs+DSwm1+btFhpaqlmrT2oGlkoF3glgLl3bTB2c= X-Received: by 2002:a92:481d:: with SMTP id v29mr3031752ila.271.1579088879269; Wed, 15 Jan 2020 03:47:59 -0800 (PST) MIME-Version: 1.0 References: <20200107131738.11932-1-pbhagavatula@marvell.com> In-Reply-To: <20200107131738.11932-1-pbhagavatula@marvell.com> From: Jerin Jacob Date: Wed, 15 Jan 2020 17:17:43 +0530 Message-ID: To: Pavan Nikhilesh Cc: Jerin Jacob , dpdk-dev Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] event/octeontx2: relax memory requirement for event timers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On Tue, Jan 7, 2020 at 6:47 PM wrote: > > From: Pavan Nikhilesh > > Relax memory requirement for event timers when internal mempool used is > octeontx2 mempool. > Add debug log to print the memory used. > > Signed-off-by: Pavan Nikhilesh Applied to dpdk-next-eventdev/master. Thanks. > --- > drivers/event/octeontx2/otx2_tim_evdev.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c > index b275c6922..cd0dcde24 100644 > --- a/drivers/event/octeontx2/otx2_tim_evdev.c > +++ b/drivers/event/octeontx2/otx2_tim_evdev.c > @@ -327,7 +327,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr) > tim_optimze_bkt_param(tim_ring); > } > > - tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts; > + if (tim_ring->disable_npa) > + tim_ring->nb_chunks = tim_ring->nb_chunks * tim_ring->nb_bkts; > + else > + tim_ring->nb_chunks = tim_ring->nb_chunks + tim_ring->nb_bkts; > + > /* Create buckets. */ > tim_ring->bkt = rte_zmalloc("otx2_tim_bucket", (tim_ring->nb_bkts) * > sizeof(struct otx2_tim_bkt), > @@ -376,6 +380,11 @@ otx2_tim_ring_create(struct rte_event_timer_adapter *adptr) > RTE_EVENT_TYPE_TIMER); > sso_xae_reconfigure(dev->event_dev); > > + otx2_tim_dbg("Total memory used %"PRIu64"MB\n", > + (uint64_t)(((tim_ring->nb_chunks * tim_ring->chunk_sz) > + + (tim_ring->nb_bkts * sizeof(struct otx2_tim_bkt))) / > + BIT_ULL(20))); > + > return rc; > > chnk_mem_err: > -- > 2.17.1 >