patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: David Marchand <david.marchand@redhat.com>
Cc: stable@dpdk.org, dev@dpdk.org, johan.kallstrom@ericsson.com,
	anatoly.burakov@intel.com, olivier.matz@6wind.com,
	jerinj@marvell.com
Subject: Re: [dpdk-stable] [PATCH v2] eal: fix ctrl thread affinity with --lcores
Date: Tue, 30 Jul 2019 23:12:34 +0200	[thread overview]
Message-ID: <2291688.Y4W8nTNPRo@xps> (raw)
In-Reply-To: <1564499122-5014-1-git-send-email-david.marchand@redhat.com>

30/07/2019 17:05, David Marchand:
> The ctrl thread cpu affinity setting has been broken when using --lcores.
> 
> Using -l/-c options makes each lcore associated to a physical cpu in a 1:1
> fashion.
> On the contrary, when using --lcores, each lcore cpu affinity can be set
> to a list of any online cpu on the system.
> 
> To handle both cases, each lcore cpu affinity is considered and removed
> from the process startup cpu affinity.
> 
> Introduced macros to manipulate dpdk cpu sets in both Linux and FreeBSD.
> 
> Examples on a 8 cores Linux system:
> 
> $ cd /sys/fs/cgroup/cpuset/
> $ mkdir dpdk
> $ cd dpdk
> $ echo 4-7 > cpuset.cpus
> $ echo 0 > cpuset.mems
> $ echo $$ > tasks
> 
> Before the fix:
> $ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
>  --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
> 
> 8427	cpu_list=4-5,7	testpmd
> 8428	cpu_list=4-6	eal-intr-thread
> 8429	cpu_list=4-6	rte_mp_handle
> 8430	cpu_list=4-5,7	lcore-slave-7
> 
> $ taskset -c 7 \
>  ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
>  --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
> 
> EAL: Detected 8 lcore(s)
> EAL: Detected 1 NUMA nodes
> EAL: Failed to create thread for interrupt handling
> EAL: FATAL: Cannot init interrupt-handling thread
> EAL: Cannot init interrupt-handling thread
> PANIC in main():
> Cannot init EAL
> 
> After the fix:
> $ ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
>  --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
> 
> 15214	cpu_list=4-5,7	testpmd
> 15215	cpu_list=6	eal-intr-thread
> 15216	cpu_list=6	rte_mp_handle
> 15217	cpu_list=4-5,7	lcore-slave-7
> 
> $ taskset -c 7 \
>  ./master/app/testpmd --master-lcore 0 --lcores '(0,7)@(7,4,5)' \
>  --no-huge --no-pci -m 512 -- -i --total-num-mbufs=2048
> 
> 15297	cpu_list=4-5,7	testpmd
> 15298	cpu_list=4-5,7	eal-intr-thread
> 15299	cpu_list=4-5,7	rte_mp_handle
> 15300	cpu_list=4-5,7	lcore-slave-7
> 
> Bugzilla ID: 322
> Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affinity")
> Cc: stable@dpdk.org
> 
> Reported-by: Johan Källström <johan.kallstrom@ericsson.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Applied, thanks




      reply	other threads:[~2019-07-30 21:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30  9:35 [dpdk-stable] [PATCH] " David Marchand
2019-07-30  9:45 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob Kollanukkaran
2019-07-30  9:46   ` David Marchand
2019-07-30 11:38 ` [dpdk-stable] " Johan Källström
2019-07-30 13:47   ` David Marchand
2019-07-30 16:32     ` Johan Källström
2019-07-30 19:21       ` David Marchand
2019-07-31  8:12         ` Johan Källström
2019-07-30 15:05 ` [dpdk-stable] [PATCH v2] " David Marchand
2019-07-30 21:12   ` Thomas Monjalon [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=2291688.Y4W8nTNPRo@xps \
    --to=thomas@monjalon.net \
    --cc=anatoly.burakov@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=johan.kallstrom@ericsson.com \
    --cc=olivier.matz@6wind.com \
    --cc=stable@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).