On 2024-10-11 16:23, Stephen Hemminger wrote:
On Thu, 10 Oct 2024 16:13:42 +0200
Mattias Rönnblom <mattias.ronnb...@ericsson.com> wrote:
This patch set introduces a new API <rte_lcore_var.h> for static
per-lcore id data allocation.
Please refer to the <rte_lcore_var.h> API documentation for both a
rationale for this new API, and a comparison to the alternatives
available.
The adoption of this API would affect many different DPDK modules, but
the author updated only a few, mostly to serve as examples in this
RFC, and to iron out some, but surely not all, wrinkles in the API.
The question on how to best allocate static per-lcore memory has been
up several times on the dev mailing list, for example in the thread on
"random: use per lcore state" RFC by Stephen Hemminger.
Lcore variables are surely not the answer to all your per-lcore-data
needs, since it only allows for more-or-less static allocation. In the
author's opinion, it does however provide a reasonably simple and
clean and seemingly very much performant solution to a real problem.
There should be a mention about whether this storage can be
shared with other threads and processes. Is it like huge page
memory or stack or heap?
Sure. I'll mention the memory is not in huge pages in the API docs.