From: "Morten Brørup" <mb@smartsharesystems.com>
To: <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: CPU affinity of control threads
Date: Thu, 15 May 2025 17:22:00 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FC57@smartserver.smartshare.dk> (raw)
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?
-Morten
next reply other threads:[~2025-05-15 15:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-15 15:22 Morten Brørup [this message]
2025-05-15 15:41 ` Bruce Richardson
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=98CBD80474FA8B44BF855DF32C47DC35E9FC57@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=bruce.richardson@intel.com \
--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).