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 4F9B8A0C4D; Wed, 1 Sep 2021 10:50:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3626D40140; Wed, 1 Sep 2021 10:50:18 +0200 (CEST) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) by mails.dpdk.org (Postfix) with ESMTP id 04C1840041 for ; Tue, 31 Aug 2021 14:32:06 +0200 (CEST) Received: from anongoth.pl (unknown [192.168.1.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 384F7D3AEE; Tue, 31 Aug 2021 14:32:04 +0200 (CEST) Date: Tue, 31 Aug 2021 14:32:02 +0200 From: Piotr Kubaj To: Juraj =?utf-8?Q?Linke=C5=A1?= Cc: David Christensen , "thomas@monjalon.net" , "david.marchand@redhat.com" , "bruce.richardson@intel.com" , "Honnappa.Nagarahalli@arm.com" , "Ruifeng.Wang@arm.com" , "ferruh.yigit@intel.com" , "jerinjacobk@gmail.com" , "jerinj@marvell.com" , "stephen@networkplumber.org" , "dev@dpdk.org" Message-ID: References: <1624964105-6525-1-git-send-email-juraj.linkes@pantheon.tech> <1626872655-27496-1-git-send-email-juraj.linkes@pantheon.tech> <8198751beeaf4a94acc951b1c1d4fba4@pantheon.tech> <93e6576242a24380b83d8ca82359c28e@pantheon.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="quAog93twVabT6i/" Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 01 Sep 2021 10:50:17 +0200 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH v5] build: optional NUMA and cpu counts detection X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" --quAog93twVabT6i/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 21-08-31 07:54:16, Juraj Linke=C5=A1 wrote: >=20 >=20 > > -----Original Message----- > > From: Piotr Kubaj > > Sent: Tuesday, August 31, 2021 2:55 AM > > To: Juraj Linke=C5=A1 > > Cc: David Christensen ; thomas@monjalon.net; > > david.marchand@redhat.com; bruce.richardson@intel.com; > > Honnappa.Nagarahalli@arm.com; Ruifeng.Wang@arm.com; > > ferruh.yigit@intel.com; jerinjacobk@gmail.com; jerinj@marvell.com; > > stephen@networkplumber.org; dev@dpdk.org > > Subject: Re: [PATCH v5] build: optional NUMA and cpu counts detection > >=20 > > Hi, > >=20 > > sorry for the late answer. >=20 > Thanks for the answer anyway, better late than never. >=20 > >=20 > > I suppose you mean sysctl command, not systemctl. > >=20 >=20 > That's right. What does lscpu say? Are the NUMA nodes non-contiguous like= this?: > NUMA node0 CPU(s): 0-63 > NUMA node8 CPU(s): 64-127 > NUMA node252 CPU(s): > NUMA node253 CPU(s): > NUMA node254 CPU(s): > NUMA node255 CPU(s): >=20 > > On dual CPU systems, it returns 2. On single CPU ones, 1. >=20 > I asked the previous question so that we know the actual numa node number= of the second CPU. If it's 8, then sysctl does some renumeration and we ca= n't use it. >=20 > Bruce, maybe we should just parse lscpu output? That introduces a depende= ncy, but that may not be such a big deal as lscpu is pretty common. There's no lscpu on FreeBSD in the base system. There is one in packages, b= ut it's written only for amd64 / i386 since it uses CPUID. https://github.c= om/NanXiao/lscpu >=20 > >=20 > > On 21-08-03 10:21:50, Juraj Linke=C5=A1 wrote: > > > > > > > > > > -----Original Message----- > > > > From: David Christensen > > > > Sent: Tuesday, August 3, 2021 1:29 AM > > > > To: Juraj Linke=C5=A1 ; thomas@monjalon= =2Enet; > > > > david.marchand@redhat.com; bruce.richardson@intel.com; > > > > Honnappa.Nagarahalli@arm.com; Ruifeng.Wang@arm.com; > > > > ferruh.yigit@intel.com; jerinjacobk@gmail.com; jerinj@marvell.com; > > > > stephen@networkplumber.org; Piotr Kubaj > > > > Cc: dev@dpdk.org > > > > Subject: Re: [PATCH v5] build: optional NUMA and cpu counts > > > > detection > > > > > > > > > > > > > > > > On 8/2/21 5:44 AM, Juraj Linke=C5=A1 wrote: > > > > >> +if os.name =3D=3D 'posix': > > > > >> + if os.path.isdir('/sys/devices/system/node'): > > > > >> + numa_nodes =3D glob.glob('/sys/devices/system/node/node= *') > > > > >> + numa_nodes.sort() > > > > >> + print(int(os.path.basename(numa_nodes[-1])[4:]) + 1) > > > > >> + else: > > > > >> + subprocess.run(['sysctl', '-n', 'vm.ndomains'], > > > > >> +check=3DFalse) > > > > >> + > > > > > > > > > > Bruce, David, Thomas, > > > > > > > > > > Is DPDK actually supported on Power9 FreeBSD? Is anyone using this > > > > combination? How can we address the open question of what exactly > > > > does sysctl -n vm.ndomains return on a Power9 FreeBSD system? Or > > > > should we just leave it as is? Or maybe add 1 to the output (as we = do in other > > cases)? > > > > > > > > Not supported within IBM, but you can buy OpenPOWER boxes from 3rd > > > > parties such as Raptor Computing Systems so there may be customers > > > > using DPDK on POWER with FreeBSD that I don't track. Adding Piotr > > > > Kubaj who has commented on POWER/FreeBSD issues in this past. > > > > > > > > Dave > > > > > > Thanks, David. > > > > > > Piotr, to provide more context, we're trying to figure out what the h= ighest > > NUMA node on a system is. > > > On P9 systems, here's how NUMA nodes look like in Linux: > > > NUMA node0 CPU(s): 0-63 > > > NUMA node8 CPU(s): 64-127 > > > NUMA node252 CPU(s): > > > NUMA node253 CPU(s): > > > NUMA node254 CPU(s): > > > NUMA node255 CPU(s): > > > The highest NUMA with CPUs is node8. > > > > > > We're trying to get the highest NUMA with CPUs on P9 FreeBSD systems,= but > > we don't know whether FreeBSD NUMA layout looks the same (does FreeBSD > > report non-contiguous NUMA nodes as Linxu above, or does it renumerate)= a > > what does "systemctl -n vm.ndomains" return. Could you check these for = us? --=20 --quAog93twVabT6i/--