public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
* [wishes/any Bug 1906] Use DPDK memory for lcore variables
@ 2026-03-20 11:57 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2026-03-20 11:57 UTC (permalink / raw)
  To: dev

http://bugs.dpdk.org/show_bug.cgi?id=1906

            Bug ID: 1906
           Summary: Use DPDK memory for lcore variables
           Product: wishes
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: any
          Assignee: dev@dpdk.org
          Reporter: mb@smartsharesystems.com
  Target Milestone: ---
             Group: wishes-managers

Goal: Use DPDK memory for lcore variables

Benefits:
1. lcore variables are stored in hugepages, with fewer TLB misses
2. lcore variables could be shared with secondary process

Means:
Compared to (RTE_CACHE_GUARD'ed) arrays indexed by lcore id, the main benefit
of lcore variables is that the variables can share the same CPU cache line,
which improves CPU cache efficiency.
The effect of cache line sharing depends on the size of the variable.
Multiple small variables can share the same CPU cache line.
Variables spanning multiple CPU cache lines have a smaller degree of overlap
within CPU cache lines.

Memory for lcore variables is allocated in chunks of RTE_MAX_LCORE_VAR *
RTE_MAX_LCORE bytes, where RTE_MAX_LCORE_VAR is the max size of an lcore
variable.

The default RTE_MAX_LCORE_VAR is 128 KB.
If using mlockall() to pin RAM to the DPDK application, the benefits of using
the standard heap with normal 4 KB pages for lcore variables - not using more
RAM than actually used by lcore variables (regardless of the size of the memory
chunks allocated for lcore variables) - disappears.

Since lcore variables' benefit of CPU cache line sharing decreases when the
lcore variables are large, it would be reasonable to reduce the max size of
lcore variables (RTE_MAX_LCORE_VAR) significantly, and recommend using other
methods for storing large per-lcore variables.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-03-20 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 11:57 [wishes/any Bug 1906] Use DPDK memory for lcore variables bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox