DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Rahul Gupta <rahulgupt@linux.microsoft.com>
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 <rahulgupt@microsoft.com>
Subject: Re: [RFC] eal: RFC to refactor rte_eal_init into sub-functions
Date: Thu, 2 Nov 2023 11:37:59 -0700	[thread overview]
Message-ID: <20231102113759.341064ba@fedora> (raw)
In-Reply-To: <1698949164-20287-1-git-send-email-rahulgupt@linux.microsoft.com>

On Thu,  2 Nov 2023 11:19:24 -0700
Rahul Gupta <rahulgupt@linux.microsoft.com> wrote:

> From: Rahul Gupta <rahulgupt@linux.microsoft.com>
> 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 <rahulgupt@microsoft.com>,  Rahul Gupta <rahulgupt@linux.microsoft.com>
> 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 <rahulgupt@microsoft.com>
> 
> 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 <rahulgupt@linux.microsoft.com>

These probably marked internal rather than part of API/ABI.

  reply	other threads:[~2023-11-02 18:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 18:19 Rahul Gupta
2023-11-02 18:37 ` Stephen Hemminger [this message]
2023-11-07 17:33   ` rahul gupta
2023-11-08 13:53     ` Dmitry Kozlyuk
2023-11-08 15:40       ` Thomas Monjalon
2023-11-09 17:26         ` Rahul Gupta
2023-11-09 17:32           ` Bruce Richardson
2023-11-10 17:25             ` Rahul Gupta
2023-11-08  4:38   ` Rahul Gupta
2023-11-08 11:51 ` Bruce Richardson
2023-11-08 15:40   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231102113759.341064ba@fedora \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=okaya@kernel.org \
    --cc=rahulgupt@linux.microsoft.com \
    --cc=rahulgupt@microsoft.com \
    --cc=rahulrgupta27@gmail.com \
    --cc=sovaradh@linux.microsoft.com \
    --cc=sowmini.varadhan@microsoft.com \
    --cc=sujithsankar@microsoft.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).