From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58050A034E for ; Mon, 14 Feb 2022 17:47:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A38840DDA; Mon, 14 Feb 2022 17:47:05 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id EA57B4067E for ; Mon, 14 Feb 2022 17:47:03 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id t4-20020a17090a510400b001b8c4a6cd5dso16366918pjh.5 for ; Mon, 14 Feb 2022 08:47:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i5TSwniSQZcCME5FEZ5msU826lFX012NMGlBeoMar8U=; b=t+8dlwFNOx1ANOUkkdz4/pPInF+IQFack86mIcN1YHED6cY/MS37nv1HAOLHTR1Mf5 ujP9F7y4bNgaRwAN/vP0N/+FgpZc/GM1te/CviAsOCwG/w5hp46j4846v8fAzF4Mcw5g IIUixUwdtrAhDEi5CWgq2r1eSYftpTxbnNyfOJWo6+CYgR+v4Hk6kqNH/SeN9k1und+C YHCPKGDMw5oqCvZ2bC79n5GQt2j1sUAKtGRmrps5uxZyLVJYTdYyrmV+Id4EfP3RVGQL Bzrv/4mzRMV/LdzgrenvJeSpJkER+ki2LMO8IHARtkcD18SE0sK5j5Sx9Nyngt7TGd3P Y14g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i5TSwniSQZcCME5FEZ5msU826lFX012NMGlBeoMar8U=; b=AabRZBx8k5WxJ9W7kYoDQSpp7udXUtdMu+zJ0VIEBDec9ZdkGaepX3qwedp+QDPX5q X1Gn39LXAGW0XDT8nnLYCl0lAT0g1YuVwfcK3TBdTtjdT7qbr01ttwzpTihkhKBZNR8t sO0ID3g3p6CdqN+5UiRqp2OsmLIFmtk461SHTaIr3KJcUO2xUK3qvIrje8N+2C2hVaia XLEpiA+Q20wEE4ULiCp5nASzRGXIklebTya0NjgaoMR0IX2n7mSp+IenNp3bPQiajLtI AGsdMfSGM9edu5vblAbyg096SU6jHcAZxjcQ/U0T7h/Z8tbQLgvN2+O0YMddbsLJMlVl MoCA== X-Gm-Message-State: AOAM531+DyH02HEG/3NkHB6+zKL0o9NUAA4+BbiEDbbXV0NL4cIudZrH FuVUujSNgoovY9udfTrktb5K0Q== X-Google-Smtp-Source: ABdhPJzoHPpe7droQQipmIewGM63J0tL8L6xDCecG5oOEtLzGf0Cn17S14NONGNBuHrchyHoXItMUQ== X-Received: by 2002:a17:90b:507:: with SMTP id r7mr15722243pjz.78.1644857223131; Mon, 14 Feb 2022 08:47:03 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id p27sm6383pfh.98.2022.02.14.08.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 08:47:02 -0800 (PST) Date: Mon, 14 Feb 2022 08:47:00 -0800 From: Stephen Hemminger To: Antoine POLLENUS Cc: "users@dpdk.org" Subject: Re: Understand main Lcore Message-ID: <20220214084700.29afe5b0@hermes.local> In-Reply-To: <50abd2e008604ec08ce7850281adf1c0@deltacast.tv> References: <50abd2e008604ec08ce7850281adf1c0@deltacast.tv> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Mon, 14 Feb 2022 08:49:09 +0000 Antoine POLLENUS 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