DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Bruce Richardson" <bruce.richardson@intel.com>,
	"Mattias Rönnblom" <hofors@lysator.liu.se>
Cc: <dev@dpdk.org>
Subject: RE: EAL threads
Date: Wed, 21 Sep 2022 12:36:07 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8733A@smartserver.smartshare.dk> (raw)
In-Reply-To: <YyrT4NDsmsT5J1IE@bricha3-MOBL.ger.corp.intel.com>

> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Wednesday, 21 September 2022 11.06
> 
> On Wed, Sep 21, 2022 at 10:39:15AM +0200, Mattias Rönnblom wrote:
> > I have some lcore-related questions:
> >
> > The documentation make use of the term "non-EAL thread". Is a non-EAL
> thread
> > the same thing as a non-lcore thread? I.e., are there EAL threads
> that are
> > not lcore threads?
> 
> Yes, there are some threads created by EAL which are not lcore threads.
> These are generally for background tasks, such as interrupts or
> telemetry,
> and are given a coremask to be kept away from the dataplane lcore
> threads.
> Therefore, I think you are right to try and get clear terminology for
> the
> threads. In most cases, I think non-EAL thread is referring to threads
> created by the app itself, but it may in some cases refer to the 'non-
> lcore
> threads' as you call them.
> 
> Personally, I would suggest terms like:
> * dataplane threads
> * background eal threads
> * app threads

Assuming that "app threads" are not performing any dataplane packet processing, I think "control plane threads" might be a better name. Consider this: The purpose of a DPDK application is to perform dataplane tasks, so "app threads" might easily be confused with "dataplane threads".

> 
> for clarity, since I think the term EAL thread is ambiguous. However,
> you or others might have been ideas for terms.
> 
> >
> > I also have a question related to rte_register_thread(): shouldn't
> the
> > documentation say the user is assumed to pin the calling thread to
> some
> > core? That is the expectation, correct?
> 
> Probably, but it's not mandatory.

For this terminology, I think both pinning and isolation of lcores should be considered.

Unfortunately, the confusion is much broader...

Most of the DPDK documentation is based on the architecture before the introduction of various mechanisms for cooperative time sharing of lcores, such as Service Cores and Graphs.

This also goes for the names of DPDK types, functions and macros. E.g. RTE_PER_LCORE [1] actually means per thread, regardless which lcore runs the thread (perhaps even multiple lcores may be scheduled from time to time to run the thread). And why aren't there similar RTE_PER_SEVICE and RTE_PER_NODE macros for Services and Graph nodes...

It would be nice settling on an expanded set of well defined terms, and cleaning up the documentation (and type/function/macro names) accordingly.

[1]: https://doc.dpdk.org/api/rte__per__lcore_8h.html


  reply	other threads:[~2022-09-21 10:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  8:39 Mattias Rönnblom
2022-09-21  9:05 ` Bruce Richardson
2022-09-21 10:36   ` Morten Brørup [this message]
2022-09-30 20:49   ` Mattias Rönnblom

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=98CBD80474FA8B44BF855DF32C47DC35D8733A@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=hofors@lysator.liu.se \
    /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).