From: Thomas Monjalon <thomas@monjalon.net>
To: Chengwen Feng <fengchengwen@huawei.com>
Cc: stephen@networkplumber.org, dev@dpdk.org
Subject: Re: [PATCH v2] examples/l3fwd: dynamic NUMA-aware alloc lcore_conf
Date: Sun, 12 Jul 2026 02:36:31 +0200 [thread overview]
Message-ID: <XD7BWPEmSkSLy6khWeEyng@monjalon.net> (raw)
In-Reply-To: <20260624032357.2153-1-fengchengwen@huawei.com>
24/06/2026 05:23, Chengwen Feng:
> Currently lcore_conf is a global static array. When multiple
> ports/lcores are distributed across different NUMA nodes, datapath
> suffers from severe cross-NUMA memory access penalty.
>
> On Kunpeng platform, sizeof(struct lcore_conf) reaches 133760 bytes.
> Such a huge per-lcore structure significantly amplifies cross-NUMA
> overhead in multi-port multi-NUMA deployment scenarios.
>
> This commit refactors lcore_conf to pointer array and implements
> per-lcore NUMA-aware hugepage allocation, allocating each lcore's
> configuration on its local socket to eliminate remote memory access.
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
There is an issue with this change as found by AI:
init_lcore_conf() is called before parse_args(),
so the new lcore_conf allocation happens before --no-numa can set numa_on = 0.
As a result, init_lcore_conf() always uses rte_lcore_to_socket_id()
and allocates each lcore_conf on the lcore's NUMA socket,
even when the user requested non-NUMA allocation.
This can also make startup fail if an enabled lcore is on a socket
without hugepage memory, although --no-numa should force allocations on socket 0.
init_lcore_conf() should be moved after parse_args(), and it should use something like:
socketid = numa_on ? rte_lcore_to_socket_id(lcore_id) : 0;
next prev parent reply other threads:[~2026-07-12 0:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 3:23 [PATCH] examples/l3fwd: dynamic NUMA-aware alloc lcore_conf Chengwen Feng
2026-06-24 3:23 ` [PATCH v2] " Chengwen Feng
2026-06-24 4:26 ` Stephen Hemminger
2026-06-24 6:05 ` fengchengwen
2026-07-12 0:36 ` Thomas Monjalon [this message]
2026-07-15 9:22 ` [PATCH] " Chengwen Feng
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=XD7BWPEmSkSLy6khWeEyng@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=fengchengwen@huawei.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