DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Bruce Richardson" <bruce.richardson@intel.com>,
	"Morten Brørup" <mb@smartsharesystems.com>
Cc: David Marchand <david.marchand@redhat.com>,
	Ray Kinsella <mdr@ashroe.eu>, Jerin Jacob <jerinj@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Harry van Haaren <harry.van.haaren@intel.com>,
	dev@dpdk.org, techboard@dpdk.org
Subject: Re: The EAL is bloated
Date: Fri, 26 Aug 2022 14:36:55 +0200	[thread overview]
Message-ID: <2594603.Isy0gbHreE@thomas> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D872BC@smartserver.smartshare.dk>

26/08/2022 13:33, Morten Brørup:
> > From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> > Sent: Friday, 26 August 2022 12.46
> > 
> > On Fri, Aug 26, 2022 at 10:58:15AM +0200, Morten Brørup wrote:
> > > Dear all,
> > >
> > > <rant> The "Environment Abstraction Layer" is expanding far beyond
> > its
> > > purpose...
> > >
> > > It not only includes abstractions for the underlying CPU Arch and
> > O/S,
> > > but also a bunch of generic utility functions. In an ideal world,
> > these
> > > belong in a Utility library; but I can live with them staying in the
> > EAL
> > > library.
> > >
> > > However, since the Utility features are also considered part of the
> > EAL
> > > library, some features get misclassified as Utilities and thus sneak
> > into
> > > the EAL library, regardless that they are completely independent of
> > the
> > > underlying CPU Arch and O/S. E.g.: Service Cores, Trace, and soon the
> > > Lcore Poll Busyness library.
> > >
> > > The EAL is not a catch-all library, and we should not allow the EAL
> > to
> > > grow like this!  </rant>
> > >
> > > If this misbehavior doesn't stop naturally, I propose that adding any
> > new
> > > feature to the EAL requires techboard approval.
> > >
> > I don't disagree with you that it is indeed becoming ever bigger, and
> > that
> > we need to do something to do some cleanup on EAL. However, IMHO this
> > is
> > not a simple problem to fix or even to draft up a solution for. I
> > actually
> > did some prototyping work in the recent past to try and see if or how
> > much
> > the EAL could be split up to make it more modular. On the plus side,
> > some
> > things like logging, for example, could be fairly easily pulled out of
> > it
> > and put into a separate library. On the other hand, really splitting
> > things
> > up beyond pulling out a few easy things was a massive undertaking - at
> > least in my tests.
> > 
> > I also think trying to classify contents between abstractions and
> > utilities
> > is overly simplistic. To my mind we also need to have a category for
> > DPDK
> > initialization code, which is a lot of what complicates things - and
> > may
> > well be the cause of a lot of the "scope creep" in EAL.
> 
> For the initialization code, it should make it easier that DPDK is no longer compiled to a bunch of independent libraries (.so files) with independent versions, but compiled into one big library.
> 
> Regarding libraries that are part of DPDK, e.g. Logging, I don't mind calling their required init functions from the various relevant locations inside the EAL. I assume that the various libraries need to be initialized at different stages throughout EAL, so a single point of "library init callout" in the EAL is not sufficient.
> 
> Some of the DPDK Core libraries, e.g. Mempool and Ring, are outside the EAL; this shows that they don't have to be part of EAL, although a DPDK application without them would be pretty silly.
> 
> Long term, the EAL could also include some hooks or similar, to allow external libraries to be initialized from EAL. The DPDK application startup sequence is well documented [1]; perhaps something can be added to this "power-on sequence" (borrowing a term from the hardware world). For inspiration, C loadable libraries expose an _init() function, which is called when the library is loaded. I don't have a solution to this; just thinking out aloud. The libraries included in DPDK could also use such a generic initialization hooking mechanism, if present.

I have a slightly different view of the init process.
I think rte_eal_init() should be considered a helper.
We could have different helpers doing much more assumptions,
and if we need a different init, the application should be able to write the init sequence entirely.


> [1] https://doc.dpdk.org/guides/prog_guide/env_abstraction_layer.html#eal-in-a-linux-userland-execution-environment
> 
> > 
> > Given the scope of the problem - and the fact that splitting EAL has
> > been
> > discussed before and nothing came of it in the community - I'm not sure
> > of
> > the best approach here. Maybe we can start by splitting out what we can
> > of
> > the easy stuff, and work iteratively from there. Alternatively if
> > someone
> > has time for a big-bang rework of EAL, that would be great too.
> 
> I wish! But I think small steps are more realistic.

I wish too.
We probably need to start somewhere.

> Splitting out the easy parts would be a good start. And it would certainly raise awareness against EAL scope creep.

+1



      reply	other threads:[~2022-08-26 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  8:58 Morten Brørup
2022-08-26 10:46 ` Bruce Richardson
2022-08-26 11:33   ` Morten Brørup
2022-08-26 12:36     ` Thomas Monjalon [this message]

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=2594603.Isy0gbHreE@thomas \
    --to=thomas@monjalon.net \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=jerinj@marvell.com \
    --cc=mb@smartsharesystems.com \
    --cc=mdr@ashroe.eu \
    --cc=skori@marvell.com \
    --cc=techboard@dpdk.org \
    /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).