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 A7E1BA0C46; Tue, 31 Aug 2021 10:03:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DDA840141; Tue, 31 Aug 2021 10:03:14 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E301140041 for ; Tue, 31 Aug 2021 10:03:12 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10092"; a="218433600" X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="218433600" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 01:03:01 -0700 X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="540916405" Received: from nmarjano-mobl2.ger.corp.intel.com (HELO bricha3-MOBL.ger.corp.intel.com) ([10.252.24.96]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 31 Aug 2021 01:02:57 -0700 Date: Tue, 31 Aug 2021 09:02:50 +0100 From: Bruce Richardson To: Juraj =?utf-8?Q?Linke=C5=A1?= Cc: Piotr Kubaj , David Christensen , "thomas@monjalon.net" , "david.marchand@redhat.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: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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" On Tue, Aug 31, 2021 at 07:54:16AM +0000, Juraj Linkeš wrote: > > > > -----Original Message----- > > From: Piotr Kubaj > > Sent: Tuesday, August 31, 2021 2:55 AM > > To: Juraj Linkeš > > 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 > > > > Hi, > > > > sorry for the late answer. > > Thanks for the answer anyway, better late than never. > > > > > I suppose you mean sysctl command, not systemctl. > > > > 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): > > > On dual CPU systems, it returns 2. On single CPU ones, 1. > > 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 can't use it. > > Bruce, maybe we should just parse lscpu output? That introduces a dependency, but that may not be such a big deal as lscpu is pretty common. > Until we are sure that we need it, can we just keep things simple? Perhaps we can use lscpu if present, and fallback to sysctl output if not.