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 057E1432CE; Wed, 8 Nov 2023 05:38:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7DFA402D4; Wed, 8 Nov 2023 05:38:58 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id B118840279 for ; Wed, 8 Nov 2023 05:38:57 +0100 (CET) Received: from microsoft.com (linux.microsoft.com [13.77.154.182]) by linux.microsoft.com (Postfix) with ESMTPSA id CBB7720B74C0; Tue, 7 Nov 2023 20:38:56 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com CBB7720B74C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1699418336; bh=Rfv+tRd3GCuoRgqVP8FzOZM7xVtc1pF45iXpDqxPyj4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o4ayfAKMzN3fd/WtGXC/wJuQJv5RaauIUmfJ2iLKE4GS0cSLIaRaBPPTvL3NbYpZa OqrYRYtmdjrwdlYf8lrd6mWiuvtdvB0vCAjla/LJVlyFJiHLDG2/Z7ozX5ar18fD+I h1F6ZI5zdVkyF+IwemB+KFvZrypZ9ke00IkbJGio= Date: Tue, 7 Nov 2023 20:38:55 -0800 From: Rahul Gupta To: Stephen Hemminger Cc: dev@dpdk.org, thomas@monjalon.net, sovaradh@linux.microsoft.com, okaya@kernel.org, sujithsankar@microsoft.com, sowmini.varadhan@microsoft.com, rahulrgupta27@gmail.com, Rahul Gupta , Rahul Gupta Subject: Re: [RFC] eal: RFC to refactor rte_eal_init into sub-functions Message-ID: <20231108043855.GA29213@microsoft.com> References: <1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com> <20231102113759.341064ba@fedora> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231102113759.341064ba@fedora> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On (11/02/23 11:37), Stephen Hemminger wrote: > Date: Thu, 2 Nov 2023 11:37:59 -0700 > From: Stephen Hemminger > To: Rahul Gupta > Cc: dev@dpdk.org, thomas@monjalon.net, sovaradh@linux.microsoft.com, > okaya@kernel.org, sujithsankar@microsoft.com, > sowmini.varadhan@microsoft.com, rahulrgupta27@gmail.com, Rahul Gupta > > Subject: Re: [RFC] eal: RFC to refactor rte_eal_init into sub-functions > X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) > > On Thu, 2 Nov 2023 11:19:24 -0700 > Rahul Gupta wrote: > > > From: Rahul Gupta > > To: dev@dpdk.org, thomas@monjalon.net > > Cc: sovaradh@linux.microsoft.com, okaya@kernel.org, sujithsankar@microsoft.com, sowmini.varadhan@microsoft.com, rahulrgupta27@gmail.com, Rahul Gupta , Rahul Gupta > > Subject: [RFC] eal: RFC to refactor rte_eal_init into sub-functions > > Date: Thu, 2 Nov 2023 11:19:24 -0700 > > X-Mailer: git-send-email 1.8.3.1 > > > > From: Rahul Gupta > > > > Initialization often requires rte_eal_init + rte_pktmbuf_pool_create > > which can consume a total time of 500-600 ms: > > a) For many devices FLR may take a significant chunk of time > > (200-250 ms in our use-case), this FLR is triggered during device > > probe in rte_eal_init(). > > b) rte_pktmbuf_pool_create() can consume upto 300-350 ms for > > applications that require huge memory. > > > > This cost is incurred on each restart (which happens in our use-case > > during binary updates for servicing). > > This patch provides an optimization using pthreads that appplications > > can use and which can save 200-230ms. > > > > In this patch, rte_eal_init() is refactored into two parts- > > a) 1st part is dependent code ie- it’s a perquisite of the FLR and > > mempool creation. So this code needs to be executed before any > > pthreads. Its named as rte_eal_init_setup() > > b) 2nd part of code is independent code ie- it can execute in parallel > > to mempool creation in a pthread. Its named as rte_probe_and_ioctl(). > > > > Existing applications require no changes unless they wish to leverage > > the optimization. > > > > If the application wants to use pthread functionality, it should call- > > a) rte_eal_init_setup() then create two or more pthreads- > > b) in one pthread call- rte_probe_and_ioctl(), > > c) second pthread call- rte_pktmbuf_pool_create() > > d) (optional) Other pthreads for any other independent function. > > > > Signed-off-by: Rahul Gupta > > These probably marked internal rather than part of API/ABI. Hi Stephen, Thanks for your review. If I make it __rte_internal then, testpmd or our application can't use it. So instead I am planning to make it __rte_experimental. Regards, Rahul.