From: Bruce Richardson <bruce.richardson@intel.com>
To: "Morten Brørup" <mb@smartsharesystems.com>
Cc: <dev@dpdk.org>
Subject: Re: CPU affinity of control threads
Date: Thu, 15 May 2025 16:41:51 +0100 [thread overview]
Message-ID: <aCYLP1aRu2DIEhG8@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9FC57@smartserver.smartshare.dk>
On Thu, May 15, 2025 at 05:22:00PM +0200, Morten Brørup wrote:
> Bruce,
>
> I found another gap in the documentation of CPU affinities.
>
> Let's assume a 6-core system.
>
> If a DPDK application is run using:
> taskset --cpu-list 0-2 dpdk-app --lcores 3-5
>
> Lcores 3-5 are EAL cores, and each of the three lcores is bound to one cpu, respectively cpu 3, 4 and 5?
> Lcore 3 is the main lcore, and lcores 4-5 are worker lcores?
> And the original thread of the process (a.k.a. the main lcore) gets its cpuset is changed from 0-2 to 3?
>
> Now, calling rte_thread_create_control() starts a control thread.
> Its documentation says:
> "Creates a control thread with the given name and attributes. The
> affinity of the new thread is based on the CPU affinity retrieved
> at the time rte_eal_init() was called, the EAL threads are then
> excluded. If setting the name of the thread fails, the error is
> ignored and a debug message is logged."
>
> What does that mean?
> I.e., what is the affinity of that control thread?
>
> A) Cpu 0-2, controlled by taskset, or
> B) cpu 3-5, controlled by the EAL --lcores parameter?
>
>
> Now, what if the application was run with:
> taskset --cpu-list 0-5 dpdk-app --lcores 0-5
>
> Since all cpus are now EAL threads, what happens with rte_thread_create_control() when "the EAL treads are then excluded", and there are no cpus left?
>
No idea! :-)
This is one of those scenarios where we need to a) test to see what current
behaviour is, and b) try and work out what the correct (or best) behaviour
should be.
/Bruce
prev parent reply other threads:[~2025-05-15 15:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 15:22 Morten Brørup
2025-05-15 15:41 ` Bruce Richardson [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=aCYLP1aRu2DIEhG8@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
/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).