public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [wishes/any Bug 1906] Use DPDK memory for lcore variables
Date: Fri, 20 Mar 2026 11:57:21 +0000	[thread overview]
Message-ID: <bug-1906-3@http.bugs.dpdk.org/> (raw)

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.

                 reply	other threads:[~2026-03-20 11:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-1906-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --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