DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Bruce Richardson" <bruce.richardson@intel.com>, <dev@dpdk.org>
Subject: RE: [PATCH] doc: provide examples of using lcores EAL parameter
Date: Mon, 7 Apr 2025 16:19:58 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FBA1@smartserver.smartshare.dk> (raw)
In-Reply-To: <20250407132451.1101691-1-bruce.richardson@intel.com>

> From: Bruce Richardson [mailto:bruce.richardson@intel.com]
> Sent: Monday, 7 April 2025 15.25
> 
> The "--lcores" EAL parameter has a very powerful syntax that can be
> used
> to provide precise control over lcore mappings. The docs however, only
> provided a minimal description of what it can do. Augment the docs by
> providing some examples of use of the option, and what the resulting
> core mappings would be.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  doc/guides/linux_gsg/eal_args.include.rst | 25 +++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/doc/guides/linux_gsg/eal_args.include.rst
> b/doc/guides/linux_gsg/eal_args.include.rst
> index 9cfbf7de84..081f09d353 100644
> --- a/doc/guides/linux_gsg/eal_args.include.rst
> +++ b/doc/guides/linux_gsg/eal_args.include.rst
> @@ -29,6 +29,31 @@ Lcore-related options
>      The grouping ``()`` can be omitted for single element group.
>      The ``@`` can be omitted if cpus and lcores have the same value.
> 
> +    Examples:
> +
> +    ``--lcores=1-3``: Run threads on physical CPUs 1, 2 and 3,
> +    with each thread having the same lcore id as the physical CPU id.
> +
> +    ``--lcores=1@(1,2)``: Run a single thread with lcore id 1,
> +    but with that thread bound to both physical CPUs 1 and 2,
> +    so it can run on either, as determined by the operating system.
> +
> +    ``--lcores='1@31,2@32,3@33'``: Run threads having internal lcore
> ids of 1, 2 and 3,
> +    but with the threads being bound to physical CPUs 31, 32 and 33.

Maybe add "respectively": "[...] bound to respectively physical CPUs [...]".

> +
> +    ``--lcores='(1-3)@(31-33)'``: Run three threads with lcore ids 1,
> 2 and 3.
> +    Unlike the previous example above,
> +    each of these threads is not bound to one specific lcore,

lcore -> physical CPU

> +    but rather, all three threads are instead bound to the three
> physical cores 31, 32 and 33.

cores -> CPUs

> +
> +    ``--lcores=(1-3)@20``: Run three threads, with lcore ids 1, 2 and
> 3,
> +    where all three threads are bound to (can only run on) physical
> CPU 20.
> +
> +.. Note::
> +    Binding multiple DPDK lcores can cause problems with poor
> performance or deadlock when using

"[...] multiple DPDK lcores can cause problems [...]" ->
"[...] multiple DPDK lcores to the same physical CPU can cause problems [...]"

> +    DPDK rings or memory pools or spinlocks.
> +    Such a configuration should only be used with care.
> +
>  .. Note::
>      At a given instance only one core option ``--lcores``, ``-l`` or
> ``-c`` can
>      be used.
> --
> 2.45.2

With above changes,
Acked-by: Morten Brørup <mb@smartsharesystems.com>


  parent reply	other threads:[~2025-04-07 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 13:24 Bruce Richardson
2025-04-07 13:27 ` Bruce Richardson
2025-04-07 14:19 ` Morten Brørup [this message]
2025-04-07 15:49 ` [PATCH v2] " 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=98CBD80474FA8B44BF855DF32C47DC35E9FBA1@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bruce.richardson@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).