DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Antoine POLLENUS <a.pollenus@deltacast.tv>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: Understand main Lcore
Date: Mon, 14 Feb 2022 08:47:00 -0800	[thread overview]
Message-ID: <20220214084700.29afe5b0@hermes.local> (raw)
In-Reply-To: <50abd2e008604ec08ce7850281adf1c0@deltacast.tv>

On Mon, 14 Feb 2022 08:49:09 +0000
Antoine POLLENUS <a.pollenus@deltacast.tv> wrote:

> Hello,
> 
> We are struggling to understand how the main lcore works and what is exactly done in it when it run.
> 
> This need of understanding come from some issues we see when setting the main lcore on the core 0 NUMA 0.
> When we do that we see some latency spike in the packet interval time like if the tx_burst was blocked for 1ms despite being on another lcore than the main one.
> 
> The spike are really annoying because our usecase is time sensitive.
> 
> The questions are:
> 
> - What is the exact role of the main lcore?

Nothing special by default. It is the initial thread created when DPDK program is
started. It is bound to first CPU during rte_eal_init()

> - How does the main lcore works ?

It is just a pthread.  If you need to know the internals (which you should if
you are debugging this kind of thing); then read eal.c

> - Do you have recommendation on which cpu core to assign main lcore ?

Same as all the others. Core selection in general is related to NUMA and CPU
topology. Use the DPDK cpu-layout script to see what your environment looks like.

> - Why would we observe the packet interval time only on core 0 ?

Linux kernel uses core 0 for timer ticks and other housekeeping, don't use
it for packet processing.

Did you isolate the DPDK application from other processes in the system.

> - Is there an implication of having interrupt on the main lcore on the other lcore ?

Interrupts take higher priority than normal user processes. And they must run
or the system will starve.


> Thank you in advance for your help,
> 
> Antoine


      reply	other threads:[~2022-02-14 16:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14  8:49 Antoine POLLENUS
2022-02-14 16:47 ` Stephen Hemminger [this message]

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=20220214084700.29afe5b0@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=a.pollenus@deltacast.tv \
    --cc=users@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).