From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C560EA0613 for ; Tue, 30 Jul 2019 23:12:43 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1B8201BF6C; Tue, 30 Jul 2019 23:12:42 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id D650F1BF66; Tue, 30 Jul 2019 23:12:40 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 87EFD22015; Tue, 30 Jul 2019 17:12:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Jul 2019 17:12:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=txtGc/OZp71dVmrGqgc+Jmg6jnz+QAxNXYzfY/k0TCg=; b=nV4TqjSYneMS sN7etZ41dWLcYWKHyXfT9bUZw7D7WiA/CM86NGzosDBqHx1sTTQWEyw8j152H88E G4TCbsR34ymaixtQ+GM8qVor63cV+U8CGRpxLRdp1oFWLmgpc+0w9OT7LNkJJRxo wdgOy31AidwwzkKtxPw6mbcuMyQYsp0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=txtGc/OZp71dVmrGqgc+Jmg6jnz+QAxNXYzfY/k0T Cg=; b=xC+E+aYsdG/bYsJqTZprLt96YufmK1Vt+oNgIGqWJ1i6tj05aK0/tDgPN CnDkfb89bB9eZdpogwcMw2L2RNDjDAbCQfr6fpR0Pw8zybSPW3JZdSbJjFA00gRm 2Fm6W6sEgS8ILTTASJCE2WABG2eqSlE7AJo2c/4VuTAehCHEXzvflpXVNYj+qVdv yOjzp8iosWIsy5oBVea3jL9uoi5xGvYLK5NjY7JPgZq28aClhSb7pMBS8/66wADe Kv3udIst7RG514Yfd3Gc4WX6UyfAyqrCdMMFHKaWhrv8Z9LtCLh3fsMFqKZuQA4y ziWppL0uoxK0jtENdMZ7FVRbzB1kg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleefgdduheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DA16A80061; Tue, 30 Jul 2019 17:12:35 -0400 (EDT) From: Thomas Monjalon To: David Marchand Cc: stable@dpdk.org, dev@dpdk.org, johan.kallstrom@ericsson.com, anatoly.burakov@intel.com, olivier.matz@6wind.com, jerinj@marvell.com Date: Tue, 30 Jul 2019 23:12:34 +0200 Message-ID: <2291688.Y4W8nTNPRo@xps> In-Reply-To: <1564499122-5014-1-git-send-email-david.marchand@redhat.com> References: <1564479354-11192-1-git-send-email-david.marchand@redhat.com> <1564499122-5014-1-git-send-email-david.marchand@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v2] eal: fix ctrl thread affinity with --lcores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 30/07/2019 17:05, David Marchand: > The ctrl thread cpu affinity setting has been broken when using --lcores. >=20 > 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. >=20 > To handle both cases, each lcore cpu affinity is considered and removed > from the process startup cpu affinity. >=20 > Introduced macros to manipulate dpdk cpu sets in both Linux and FreeBSD. >=20 > Examples on a 8 cores Linux system: >=20 > $ cd /sys/fs/cgroup/cpuset/ > $ mkdir dpdk > $ cd dpdk > $ echo 4-7 > cpuset.cpus > $ echo 0 > cpuset.mems > $ echo $$ > tasks >=20 > 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=3D2048 >=20 > 8427 cpu_list=3D4-5,7 testpmd > 8428 cpu_list=3D4-6 eal-intr-thread > 8429 cpu_list=3D4-6 rte_mp_handle > 8430 cpu_list=3D4-5,7 lcore-slave-7 >=20 > $ 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=3D2048 >=20 > 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 >=20 > 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=3D2048 >=20 > 15214 cpu_list=3D4-5,7 testpmd > 15215 cpu_list=3D6 eal-intr-thread > 15216 cpu_list=3D6 rte_mp_handle > 15217 cpu_list=3D4-5,7 lcore-slave-7 >=20 > $ 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=3D2048 >=20 > 15297 cpu_list=3D4-5,7 testpmd > 15298 cpu_list=3D4-5,7 eal-intr-thread > 15299 cpu_list=3D4-5,7 rte_mp_handle > 15300 cpu_list=3D4-5,7 lcore-slave-7 >=20 > Bugzilla ID: 322 > Fixes: c3568ea37670 ("eal: restrict control threads to startup CPU affini= ty") > Cc: stable@dpdk.org >=20 > Reported-by: Johan K=E4llstr=F6m > Signed-off-by: David Marchand Applied, thanks