From: Bruce Richardson <bruce.richardson@intel.com>
To: Rahul Gupta <rahulgupt@linux.microsoft.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>, <dmitry.kozliuk@gmail.com>,
<stephen@networkplumber.org>, <sovaradh@linux.microsoft.com>,
<okaya@kernel.org>, <sujithsankar@microsoft.com>,
<sowmini.varadhan@microsoft.com>, <krathinavel@microsoft.com>,
<rahulrgupta27@gmail.com>, Rahul Gupta <rahulgupt@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH v3] eal: refactor rte_eal_init into sub-functions
Date: Fri, 19 Jan 2024 17:26:37 +0000 [thread overview]
Message-ID: <ZaqwzXrxoPHxuH9d@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <1705683497-25074-1-git-send-email-rahulgupt@linux.microsoft.com>
On Fri, Jan 19, 2024 at 08:58:17AM -0800, Rahul Gupta wrote:
> From: Rahul Gupta <rahulgupt@microsoft.com>
>
> In continuation to the following email, I am sending this patch.
> (https://inbox.dpdk.org/dev/20231110172523.GA17466@microsoft.com/)
>
> Initialization 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 up to 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 applications
> 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_eal_init_async().
>
> Existing applications requires to just call-
> rte_eal_init_wait_async_complete() after rte_eal_init() unless they wish
> to leverage the optimization.
>
This part here is a bit problematic. For something as ubiquitous as
rte_eal_init(), we should not be requiring existing application change.
Instead, can you create a new init function to replace rte_eal_init() in
the async case - and then eal_init can call that and then the
async_complete function, to avoid duplicating code.
The goal should be to have existing apps unaffected, but to allow a path to
faster startup for those that need it. In the original email you linked to
above, we had such a proposal: rte_eal_init_async() &
rte_eal_init_async_done().
Thanks,
/Bruce
next prev parent reply other threads:[~2024-01-19 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 16:58 Rahul Gupta
2024-01-19 17:26 ` Bruce Richardson [this message]
2024-01-19 22:16 ` Stephen Hemminger
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=ZaqwzXrxoPHxuH9d@bricha3-MOBL.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=krathinavel@microsoft.com \
--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=stephen@networkplumber.org \
--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).