From: Bruce Richardson <bruce.richardson@intel.com>
To: <dev@dpdk.org>
Cc: <david.marchand@redhat.com>, <mb@smartsharesystems.com>,
<stephen@networkplumber.org>
Subject: Re: [PATCH v3 4/4] eal: add option for auto-mapping cpu ids to low lcore ids
Date: Tue, 13 May 2025 17:21:09 +0100 [thread overview]
Message-ID: <aCNxdZUM25AjmRIw@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20250502151134.536799-5-bruce.richardson@intel.com>
On Fri, May 02, 2025 at 04:11:34PM +0100, Bruce Richardson wrote:
> When attempting to run DPDK with cpu ids > RTE_MAX_LCORE, it can be
> awkward to build up a command-line parameter specifying the cpu to lcore
> mappings core-by-core. To simplify things for the common case, add in
> the -L, --lcores-automap option, to take a list of cpu ids, which may or
> may not be >= RTE_MAX_LCORE, and map them to lcore ids starting at zero.
>
> For example, running lcores_autotest with dpdk-test on cores 140-143
> with a build where RTE_MAX_LCORE is 128, is now as simple as:
>
> $ ./dpdk-test -L 140-143 -- lcores_autotest
> ...
> EAL threads count: 4, RTE_MAX_LCORE=128
> lcore 0, socket 1, role RTE, cpuset 140
> lcore 1, socket 1, role RTE, cpuset 141
> lcore 2, socket 1, role RTE, cpuset 142
> lcore 3, socket 1, role RTE, cpuset 143
> ...
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> doc/guides/linux_gsg/eal_args.include.rst | 16 +++++-
> lib/eal/common/eal_common_options.c | 69 +++++++++++++++++++++--
> lib/eal/common/eal_options.h | 2 +
> lib/eal/windows/include/sched.h | 1 +
> 4 files changed, 81 insertions(+), 7 deletions(-)
>
There is (I think) the skeleton of a good solution in this patcht, but
there are more conditions to be considered and thought of yet. Specifically
the needs of multi-process, where a secondary cannot re-use lcore ids in
the primary, needs to be taken into account.
Another scenario not accounted for here, is the one where the user runs the
app using "taskset" rather than specifying an lcore id. Using taskset with
cores >RTE_MAX_LCORE currently doesn't work, and this patch doesn't fix it.
Therefore, for simplicity, I'm dropping this (patch 4) from v4 of this set,
while investigating how we can improve things a bit further. I will start a
new series with any futher work I get done in this release.
/Bruce
next prev parent reply other threads:[~2025-05-13 16:21 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 11:38 [RFC PATCH 0/3] allow easier use of high lcore-ids Bruce Richardson
2025-03-13 11:38 ` [RFC PATCH 1/3] eal: centralize core parameter parsing Bruce Richardson
2025-03-13 11:38 ` [RFC PATCH 2/3] eal: convert core masks and lists to core sets Bruce Richardson
2025-03-13 11:38 ` [RFC PATCH 3/3] eal: allow automatic mapping of high lcore ids Bruce Richardson
2025-03-24 17:30 ` [PATCH v2 0/3] allow easier use of high lcore-ids Bruce Richardson
2025-03-24 17:30 ` [PATCH v2 1/3] eal: centralize core parameter parsing Bruce Richardson
2025-04-07 6:58 ` David Marchand
2025-03-24 17:30 ` [PATCH v2 2/3] eal: convert core masks and lists to core sets Bruce Richardson
2025-04-07 6:59 ` David Marchand
2025-03-24 17:30 ` [PATCH v2 3/3] eal: allow automatic mapping of high lcore ids Bruce Richardson
2025-04-01 14:06 ` [PATCH v2 0/3] allow easier use of high lcore-ids Bruce Richardson
2025-04-07 7:04 ` David Marchand
2025-04-07 9:48 ` Bruce Richardson
2025-04-07 10:15 ` Morten Brørup
2025-04-07 10:40 ` Bruce Richardson
2025-04-07 11:32 ` Morten Brørup
2025-04-07 11:56 ` Bruce Richardson
2025-04-07 12:25 ` Morten Brørup
2025-04-07 12:41 ` Bruce Richardson
2025-04-07 13:18 ` Morten Brørup
2025-04-07 13:24 ` Bruce Richardson
2025-04-07 15:14 ` Stephen Hemminger
2025-04-07 15:38 ` Bruce Richardson
2025-05-02 15:11 ` [PATCH v3 0/4] rework and expand EAL lcore options Bruce Richardson
2025-05-02 15:11 ` [PATCH v3 1/4] eal: deprecate old coremask-based EAL parameters Bruce Richardson
2025-05-02 15:51 ` Stephen Hemminger
2025-05-02 16:00 ` Bruce Richardson
2025-05-03 6:09 ` Morten Brørup
2025-05-02 15:11 ` [PATCH v3 2/4] eal: merge corelist and core mapping options Bruce Richardson
2025-05-02 15:11 ` [PATCH v3 3/4] doc: provide examples of using lcores EAL parameter Bruce Richardson
2025-05-02 15:11 ` [PATCH v3 4/4] eal: add option for auto-mapping cpu ids to low lcore ids Bruce Richardson
2025-05-13 16:21 ` Bruce Richardson [this message]
2025-05-04 21:17 ` [PATCH v3 0/4] rework and expand EAL lcore options Patrick Robb
2025-05-13 16:17 ` [PATCH v4 0/3] lcore options cleanup Bruce Richardson
2025-05-13 16:17 ` [PATCH v4 1/3] eal: deprecate old coremask-based EAL parameters Bruce Richardson
2025-05-13 16:17 ` [PATCH v4 2/3] eal: merge corelist and core mapping options Bruce Richardson
2025-05-13 16:17 ` [PATCH v4 3/3] doc: provide examples of using lcores EAL parameter 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=aCNxdZUM25AjmRIw@bricha3-mobl1.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.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).