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 5EC6FA04B5; Sat, 7 Nov 2020 00:41:13 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C5592100C; Sat, 7 Nov 2020 00:41:10 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130047.outbound.protection.outlook.com [40.107.13.47]) by dpdk.org (Postfix) with ESMTP id 26278F64 for ; Sat, 7 Nov 2020 00:41:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jtZaiZzA92rhVC/GZ0wcvEGt7eNq7OsWXlLYzYXPvi8=; b=B4/mn5F3qq5xTn+T1TsURjanXoZ2ezI1cA7VsQIKvZ/HEJoeC4uyZiRDED2DJjhCYZiYt+F35OxiwFQ0qdVzOH3sybjPfAls5+8+Sp2CPTmdq5fQOXi9O9+5UeyuZC2uJ0FZYZ9pPH04EZhXsmuOmOYidEcKqtcg+wqKnQHsr9w= Received: from DB7PR02CA0031.eurprd02.prod.outlook.com (2603:10a6:10:52::44) by AM5PR0801MB2035.eurprd08.prod.outlook.com (2603:10a6:203:4a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.29; Fri, 6 Nov 2020 23:41:04 +0000 Received: from DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:52:cafe::f1) by DB7PR02CA0031.outlook.office365.com (2603:10a6:10:52::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21 via Frontend Transport; Fri, 6 Nov 2020 23:41:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dpdk.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dpdk.org; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT033.mail.protection.outlook.com (10.152.20.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.17 via Frontend Transport; Fri, 6 Nov 2020 23:41:04 +0000 Received: ("Tessian outbound 39167997cde8:v71"); Fri, 06 Nov 2020 23:41:04 +0000 X-CR-MTA-TID: 64aa7808 Received: from 58bb20d3ff1b.4 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 25B7C96A-29D3-4A25-B9C1-BB8CDF3144BD.1; Fri, 06 Nov 2020 23:40:59 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 58bb20d3ff1b.4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 06 Nov 2020 23:40:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mt+HOgf0CATmT+4ljYXIY1XoGfIqUjm6KaWf7XtFaK2QBoiAQ0HnkuxMHLkHjeEC8fdplqe97YCJ96+hBAIp6r4rUhTFjdZkD4kBUfAjQXUxoOR4m7r2TKxwUklH8MJ9WsGmmoe1LnJmrVGWuD7k1nA67HqlAScuyT9zr6XsTuOlHq3qaHcW9iXNHxXpYffLeSuS9SjzIB8Op9aT6v3enKkalDUx4RiocVX73z9JI3HhTXjBEOThl8SK8Cmg4royGIFp/iCmRi0r4TFrFxOdYcWcP0bB6GMjo4c1tyYoSs6UWeozHEUJwgD3WnyVDLuZzYYTMt9K8Bx8/5c4SBWNeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jtZaiZzA92rhVC/GZ0wcvEGt7eNq7OsWXlLYzYXPvi8=; b=gnMyp4fED7QgV73AhL95tsC4iPrBVLdnhVDm9oEdlGsn66bpHkrpKfm65Idea7v1lM8Eg+3mQu+a/UYe11NBzw7SBz6WZZGLkBNsuGKSPLqAZybrLsFICc0MHnc/lVSTefhC2gj30LNXaKrtRFvJ0jvD2vDNGpvXhua1PiSCtcGFVOqweX2kEslunjnRvueAWRAw4dj9ElOp0YDRPgA4KSd1W0ToRYbSLi4h4ZAMRvPV/eWZV5rydHhRXnkirOcOgmzRLAXF6nRngDlsUfiDBt6G29m0wO2LbMZhis9kvz/Z5TMOGf+fwLI59LwUgJtWAlZ/8H5DX0rbUj7CzNeBQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jtZaiZzA92rhVC/GZ0wcvEGt7eNq7OsWXlLYzYXPvi8=; b=B4/mn5F3qq5xTn+T1TsURjanXoZ2ezI1cA7VsQIKvZ/HEJoeC4uyZiRDED2DJjhCYZiYt+F35OxiwFQ0qdVzOH3sybjPfAls5+8+Sp2CPTmdq5fQOXi9O9+5UeyuZC2uJ0FZYZ9pPH04EZhXsmuOmOYidEcKqtcg+wqKnQHsr9w= Received: from DBAPR08MB5814.eurprd08.prod.outlook.com (2603:10a6:10:1b1::6) by DB8PR08MB5482.eurprd08.prod.outlook.com (2603:10a6:10:116::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27; Fri, 6 Nov 2020 23:40:57 +0000 Received: from DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::7814:9c1:781f:475d]) by DBAPR08MB5814.eurprd08.prod.outlook.com ([fe80::7814:9c1:781f:475d%4]) with mapi id 15.20.3541.021; Fri, 6 Nov 2020 23:40:57 +0000 From: Honnappa Nagarahalli To: Bruce Richardson CC: =?iso-8859-2?Q?Juraj_Linke=B9?= , Ruifeng Wang , Phil Yang , "vcchunga@amazon.com" , Dharmik Thakkar , "jerinjacobk@gmail.com" , "hemant.agrawal@nxp.com" , "dev@dpdk.org" , nd , Honnappa Nagarahalli , nd Thread-Topic: [RFC PATCH v3 3/6] build: automatic NUMA and cpu counts detection Thread-Index: AQHWp6IW878hzFF1g0GNj7nrgxEFCqmiBV+AgAAUA4CAC+ae4IAG8FYAgAAAwdCAAUuSAIAFnLwA Date: Fri, 6 Nov 2020 23:40:57 +0000 Message-ID: References: <1602600882-695-1-git-send-email-juraj.linkes@pantheon.tech> <1603280261-20206-1-git-send-email-juraj.linkes@pantheon.tech> <1603280261-20206-4-git-send-email-juraj.linkes@pantheon.tech> <20201021120220.GC592@bricha3-MOBL.ger.corp.intel.com> <54e20244e1e841148669eb93b6b8876c@pantheon.tech> <20201021141319.GD592@bricha3-MOBL.ger.corp.intel.com> <20201102135520.GA1454@bricha3-MOBL.ger.corp.intel.com> <20201103094446.GA1132@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20201103094446.GA1132@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ts-tracking-id: 3272D9D09056B7409B0BFF16842BC4CF.0 x-checkrecipientchecked: true Authentication-Results-Original: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; x-originating-ip: [107.77.222.50] x-ms-publictraffictype: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 311d566e-06c5-4def-b635-08d882ad6d02 x-ms-traffictypediagnostic: DB8PR08MB5482:|AM5PR0801MB2035: x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-ms-exchange-transport-forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: eZu5PJqDLlbFVRJVkJFL1S93H4XW0WXCQntBe5dl4vHoBmx+V9uXdy9j8LjgJZWUhgNZ5g1gf4zlOLiDO1YDzGEwGl1ixq6KTwI/cVp4c/XbBqCVXNEcK65LPw1AJmWPul494KftlH84D+j2y/u3vmavnXmIZRZXZH1QnIFuQZSQ6FK0f2AiYabKv1rHaktrmePyCPCI0C4eCiqLSTQFEpOaQGqQ2g7Gk8ffVCPDOWtx6C7h3HhiCGcQB32LMgPrczeTcx0t4C0q/EqH8yuGZfENkxhmksDIqbvDmPhJZfJma9shGeKSDUzxLX/HzawYsgcN6ga0qfo3MNjBjAKHyw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DBAPR08MB5814.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(346002)(39860400002)(136003)(366004)(396003)(26005)(316002)(55016002)(54906003)(6916009)(6506007)(478600001)(64756008)(66476007)(4326008)(83380400001)(66946007)(7696005)(186003)(66446008)(76116006)(66556008)(33656002)(8936002)(2906002)(5660300002)(71200400001)(9686003)(52536014)(8676002)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: /wOQKYOBTrfVsHHSHccsenWU2FdpoUeogMZbG15nwywC/jDetjVFyOrQT4DtsrfUtE9TIePBRrc1DpAIJVsBLQHn6ume3OozedlyCGeuj1YjZgeaX89HdF6iKpQVfCbR8TL3Nc19ld0yfXklYUTdqrBxxQuX7O9vaEEDWpWNnQddthslJ5N8nl4lPcgYAA2wzMiu+DSM125CWGTiPkEHBuB3Dy9L1P55ZmvGDnpTAH5ZO1MwNH0jL8xyKrVkY/mR1pujt41gp1B94iq+GD5u3Hk8/GZnXd1ZssBDfWqHFoJn/6Ug337LIC73mB6TmLl5fhZyztlpZ5vobgUhQRdwXSPy+8h6/KCCUdJE7YjEQ1B2WWGNnwF54CliwjWbKOi77vulpIwSCCr5iHBlj1P4PNWS6XPzNyLP8a42V0pO1tn0Lm2Hl+x6Jni2OppRB/v2Mhv6KazBsP4LD40ucMwYqs9d5hNWZEQxKzGulmSdUF9Z60bQIZnwTRgizTeWooEUL3dgykNpnAIzSrAVPxGAv2G/pGHc4CXxhlOg41un6xliV2DZqWaLjJKUO2RZgXBX5hDFfo/AXq9JKBFHmwX4zVxcD3ZfUcWphF+UqDpXjTDoYftNkbjbX8tJI64OknB7Ot+A8q1CEPQZ8BNLXQyL2g== Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5482 Original-Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 220cb15e-251f-4142-07fc-08d882ad6908 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rMPYVVdyypG3MIi1qGLUvK81wGx+4WJM/rMSfyyie4jICBuzrC00sVTpmXdx2MtQgcXCp4CO44l54WxPk5drSTdgv/gxvcZIi8Nw7KOhLBM/VAIC0NbJpV1cgMJWQrEd53rSJmUsSKJShOaL9MD3eUm1H/X6EtFDsPbDZ+FuZbYAa2UP/yuDmnAPl4vnN2I5Bjln7lcipM0Rmj/llZlv2R1qFgvikXYWpjMT0bIKn0dThznU6cKpVxvZCta42qCSAoUtoTGz72vCpyWAX+M/luvXPU+Ylzr4YZymrj7CCknQMVbOZejCYc+5thmH4sA/aaLuPZhZoshOzcCQoB4XdKdHz005cNk7jtxvbiCJj2o7go1Hoo4HLuSllvSrVME+rT6+be07riXcNVwl14v0Ew== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(4636009)(346002)(376002)(39860400002)(136003)(396003)(46966005)(8936002)(52536014)(4326008)(478600001)(54906003)(6862004)(316002)(6506007)(5660300002)(86362001)(8676002)(55016002)(81166007)(47076004)(83380400001)(9686003)(33656002)(336012)(186003)(82740400003)(70586007)(70206006)(7696005)(2906002)(82310400003)(356005)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2020 23:41:04.2702 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 311d566e-06c5-4def-b635-08d882ad6d02 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT033.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2035 Subject: Re: [dpdk-dev] [RFC PATCH v3 3/6] build: automatic NUMA and cpu counts detection 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" > > > > > > > > > Part of the confusion arises from the fact that originally that was > > > the only parameter set by this - and on x86 it still is. Perhaps > > > this parameter needs to > > Just wondering, for x86, what does it mean if we set the max_num_cores > and max_numa_nodes based on dynamic detection for 'native' build? > > ISA still remains the same as before. But, the build might not work on > machines with higher number of cores and numa nodes. > > At the same time, the build also might not work on a machine with a > different ISA. The users need to be aware that the target machine has the > same ISA and same number of cores/numa nodes as the target machine. > > > Yes, that is a fair summary. >=20 > > > be renamed to "isa-level" or "architecture-flag" or similar to > > > reflect its meaning. This would then allow a new "machine" setting, > > > which can be considered separately. The question then is how much > > > that helps with the main issue under discussion, that of cores and nu= ma > node values. > > If we rename it, we will have backward compatibility issue (i.e. 'nativ= e' build > on x86 will have different meaning and whoever wants the original meaning= , > have to change to using this new name). Not sure about the complexity in > meson scripts. > > >=20 > Yep, it was just a thought to see if it could help in this situation. >=20 > > > > > > > > > But, I think other DPDK specific parameters should also be consider= ed. > > > > For ex: RTE_MAX_LCORE should have a particular value for 'generic' > > > > build in > > > all the supported architectures. The value could be different for > > > each architecture, but it is fixed for the 'generic' build for a give= n > architecture. > > > Otherwise, the 'generic' build might not run on all the machines of > > > that architecture. > > > > > > > > Similarly, for 'native' build, is there any reason not to include > > > > other DPDK > > > parameters as part of the definition? IMO, 'native' should refer to > > > the entire build machine, not just the ISA. i.e. build on the target = machine. > > > > > > > > > > While I understand the idea here, it is somewhat complicated by the > > > fact that the meson options given in "meson_options.txt" cannot be > > > set by meson code, which means that when we change the machine flag > > > to "native" we can only use or ignore the user-provided lcores and > > > numa nodes setting - we have no way to change them and reflect those > > > changes back to the user. :-( This leads to the situation in the > > > discussion in this thread, where we start needing all sorts of magic > > > values to indicate use of machine-type defaults or detected defaults. > > I am wondering why we need to take the max_num_cores and > max_numa_nodes from the user? This option was not provided in the make > build system. I ask this question because for 'generic' this has to be a > static/known configuration. For cross builds, this info can come (or deri= ved) > from the cross build file. > > Was it supposed to be used in conjunction with 'native' build? > > >=20 > Well, it was configurable in the build config files same as all other DPD= K build > settings with make. When working first on meson, I felt it was a setting = the > user might be likely to want to tune, which is why I put it into the > meson_options.txt and nobody suggested otherwise on review [which is the > reason why many of the current options are the way they are :-)]. >=20 > From my side, I have a couple of unknowns: > 1. How big a difference in terms of memory use etc. of DPDK does it make = by > having really big values for these core/numa counts? If there is not m= uch > difference, then there is indeed little value in having them configura= ble > at all, and we should just use big defaults and be done with it. > 2. If there is a noticable difference in these settings, how many users a= re > going to want to actually go to the trouble of tweaking these? > 3. How big an effort is it to switch to having these settings made entire= ly > dynamic at runtime? Doing so would naturally make the need for these > settings completely go away. A lot of the usage seems to be in the test code. Are these constants expose= d to the users? >=20 > With all that said, I'd be ok with a number of solutions. I'm ok to have = these > dropped as meson options and just have them specified in other ways, e.g. > cross-file, or from meson.build files. [For x86, I'd tend towards having = them > defined in rte_config.h inside x86-specific ifdefs]. > Alternatively, I'm also happy enough with the proposed scheme here of > allowing user override, with platform defaults using "0"-value and detect= ion > using "-1". Ok, we will stick to the methods in this patch. >=20 > Regards, > /Bruce