DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <hofors@lysator.liu.se>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: rte_lcore_count() semantics
Date: Wed, 12 Oct 2022 08:03:30 +0200	[thread overview]
Message-ID: <df21c578-e74e-f4ae-82b4-60debd4c5f58@lysator.liu.se> (raw)

Hi.

According to the API documentation, rte_lcore_count() sets out to 
"Return the number of execution units (lcores) on the system"

The EAL documentation states that "the term 'lcore' refers to an EAL 
thread", and also refers to regular pthreads having called 
rte_thread_register() as "registered non-EAL threads".

This might lead the unwary to believe that rte_lcore_count() did not 
include registered non-EAL threads (i.e., normal pthreads that called 
rte_thread_register()). But it does.

Registered non-EAL threads are excluded in RTE_LCORE_FOREACH() loops, as 
expected. However, the FOREACH macro documentation says "Macro to browse 
all running lcores.". Should all interpret all this as a registered 
non-EAL thread is a non-running lcore? But a lcore is just another name 
for an EAL thread (at least that's how I interpret "refers to"), and 
that would lead the non-EAL thread to be an EAL thread. Beyond the 
obvious contradiction, the non-EAL thread is not a EAL thread, since you 
can't launch tasks on it.

Something is not right here.

Any thoughts?

Thanks,
	Mattias

                 reply	other threads:[~2022-10-12  6:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=df21c578-e74e-f4ae-82b4-60debd4c5f58@lysator.liu.se \
    --to=hofors@lysator.liu.se \
    --cc=dev@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).