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 ED2FF45656; Fri, 19 Jul 2024 18:11:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A7FC410D0; Fri, 19 Jul 2024 18:11:04 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by mails.dpdk.org (Postfix) with ESMTP id 0575040E5A; Fri, 19 Jul 2024 18:11:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1721405462; x=1752941462; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=8+FBD+ZAEsFGrKDF8Pso9Wg1bxIaDtwlhOJ3y0sedQQ=; b=CYkpqPQqGtUYEeFYrrXja9X2WZB8pc7qrSVfcL26cywOaNrtC9R5wUMx 1ZRohmoBmoMJ6Rlt83+ZL16JYPJeJ8meKgundqDXqT6z15xVLgwYmXh5P +oI6e1eGuMs8K1/NfPBaMHLj0F1d+MOd2PDPjb7N9AuSe3uzXiMEYrOR1 qPHcY1kC8Dbi0+W0VYp25FSvST0mVjVJopU9PrX5+P6DdnVxbu6ltOCDz r4em9gWWIvQoF5w3Jwuh4PWCOXROuEXCfBicdOGz7IQ7xfrMAXCkveYa1 k5j4dPOwuymlTJZbEh3evyowDHgy2c+v/TUwTU4T7JPxHJhlYaxivxwN+ Q==; X-CSE-ConnectionGUID: qtpZZWrJTIaChgVGexIWXQ== X-CSE-MsgGUID: doQP18zSSlm04UV7MC4iMg== X-IronPort-AV: E=McAfee;i="6700,10204,11138"; a="29686430" X-IronPort-AV: E=Sophos;i="6.09,221,1716274800"; d="scan'208";a="29686430" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2024 09:11:01 -0700 X-CSE-ConnectionGUID: 6Afo9k2NSmCpvPOUyD8gfA== X-CSE-MsgGUID: awVXgSr9RXqTDvxkrEIQzw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,221,1716274800"; d="scan'208";a="56002478" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 19 Jul 2024 09:11:01 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 19 Jul 2024 09:11:00 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Fri, 19 Jul 2024 09:11:00 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.101) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Fri, 19 Jul 2024 09:10:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SqV5n5gy7p4wA7z6gCjMjjy0Cvv8WZKwt5v0ljZjkKbtaXxEjyH2vLaJgjdBuzsHLCPwGR9WSw6DnM3n6RZ6oI6qZhSwf2rxA/yS7RKxbr8ZWTFBKfNQV2OxjLDICdCsh76nWP6ErHrwrCzLvglWsU9OjHXDi4BBBBvQAlmsEZ3wBieyh/W1/PDHStZY1XezGspjlBLL5q52cuHI03ggOMYeqL/OqOf31h5cPo6ZhqmOCQeZ8r76qhX2sKo47aDjD88pqyqRpG5Ui49zKKO8yXRQoiH2ZzIxa32qfccf4E6g6yUfAA1a/lk8Ev77C32cbO4GGQbfbpC5ZqsZsYzfZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3aQxrLwASpRcnjKbuw2IMf9HBJt5AmnMYfkNEW9AS8Y=; b=wFeTE+gGB921mJb9gzmUdJstqliG2WpsiJmnauzPYDSxcTXeGmebpmD+ARTNx2W3D5lw/VFTKbtOhitUcd4UdDk04Ovs87KDyhacXyfBY7xp0nPJHredoLZON1eVEXOaEpAPxw6VO4Ad4Majqt3usYBqvqbQGlvuY3iFnVxrL8Ro8tDOHxM/6sE4w+ogG4fm72a95xXVqLZPtG20zLzTCoavILKlEp7Bq3+aoWwf0/ojHZEDyU5bfaeI1j1pVWL+rzatmP0tbTotatSa3yeUI8B2FhXulzZRu8ly3Vso5sCvY3FlIJjERJsxvlhUSZjb+2a7q6xi8pGfslNm/wUGeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by SJ2PR11MB7454.namprd11.prod.outlook.com (2603:10b6:a03:4cc::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.36; Fri, 19 Jul 2024 16:10:54 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::f120:cc1f:d78d:ae9b%7]) with mapi id 15.20.7784.016; Fri, 19 Jul 2024 16:10:53 +0000 Date: Fri, 19 Jul 2024 17:10:47 +0100 From: Bruce Richardson To: Ferruh Yigit CC: , , Padraig Connolly Subject: Re: [PATCH] ethdev: fix device init without socket-local memory Message-ID: References: <20240711123500.483119-1-bruce.richardson@intel.com> <4f7e619a-0398-41cc-90a9-3c52b73d1c49@amd.com> <57b08bdb-5f45-4343-a8d2-598d66d82fe8@amd.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: DB7PR02CA0014.eurprd02.prod.outlook.com (2603:10a6:10:52::27) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|SJ2PR11MB7454:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d61ba99-111a-4818-85fc-08dca80d5d7d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8sG9e9i7Nq6jtuBiMhpoUsDXaInWmvT1wZt9aTIUHqeSRdzJJ9l7PZGIS5pn?= =?us-ascii?Q?rpEW0Nt+l5T1WOTLGiYJdKkD+DxU/sDwX90x2uwcwt68rkHfVSyS/4XH8gPQ?= =?us-ascii?Q?hEgCJDdMtdJhO22/fxBmdy9DwKE1mELV4s/1NLjHeIOV1ARmkwqJ24Guyrlk?= =?us-ascii?Q?7iuLqmyDdVs1lvUrUEmkX/jBTnK9ViY1lhqSOpBrIgKtRcwSJ44jYqjpQH0b?= =?us-ascii?Q?j4HYFocCrWzMTpRQqs4NNo3CMcSjBHc+DdOjQPH60utT2MkavzrPmdwd0Rc/?= =?us-ascii?Q?OvbezM2LPcA8VZx3MfJUpOlv0ctaHB4uwtbHJ+uljcbBD3VyLrkeHJoZsV9W?= =?us-ascii?Q?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IRhXYkOBSRqnggNLMWabu?= =?us-ascii?Q?I2ushw/avCOJ0TYsSkolpLRf0xq0QUOhw6UVkDdrlVlsCgBThXlIx3BVrGQT?= =?us-ascii?Q?6F+RrX3OU9cCnY5URQ/2782o+V4yQF9UAnb1L4MHM8xwuQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?81eI51ADJbYe3uuyQrijATjm0en2z7vdlmkg9JIYDszjdTclu11e2dQ5qStC?= =?us-ascii?Q?8vENHq65rjWaM8+CNBVpbbZwhWpLkpfUnfRkk8gBCpWHHV5gXpfKNapXGyn8?= =?us-ascii?Q?qGnwizvVY0HKpSXwPmNgHAdZo32M6oHk4uHd0Tt2KSgjgQhp2cjhe14Ybt9Z?= =?us-ascii?Q?vUOOg03Sq8t8gQ6aiEuUhOPZxNZ8Sn9ZJFIi801RiK50f0Zrg9yG0pIRxfXd?= =?us-ascii?Q?nPSwpxkSw1CXM7drHWYexqY/Z+tmaeQCqN264VSVD8t6Ng9AvfG7YmRneX8h?= =?us-ascii?Q?IRTqXoUUcI9/p+v2cjiyTCqKqeipb4GuAqIOSyMZ0DXGvu9N45QO3/EiL5pV?= =?us-ascii?Q?L6gxis/LPt8B4qw6NXm70JzGkQtE+a/C6/4LBtH+JIKV78v8fWb5he2Hy0kr?= =?us-ascii?Q?Nf0DkJK9E4f6j62QM33xMu/uh/nBJSURKIFysxKQGlEa4R0Q65TVZZ23MicH?= =?us-ascii?Q?aBDLgcimCGdd0CmMW7iTW01TiKdDbSh3orst9Lu586GxGNGsCVlJtdmihFfS?= =?us-ascii?Q?l6lZsenMzAvr2gqQYDPck4bOkB/m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?WWsDgvXX9DZJ0VgcLrUIPCJ6q4AmeJIdTQ78Dy1qXCDQvcmgnUXkZDYhIWGc?= =?us-ascii?Q?vguWDpr99AuCK2isjmn/SgBchw0UVV8iwH99bnzHJQ6ZamTU8RVMsrheH3gX?= =?us-ascii?Q?FO0uhWHvKKnmFIeTf/glN/ZedXmoUHFhht+1NRLtH3aAbX96rrFYVdzDtrcU?= =?us-ascii?Q?hg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4d61ba99-111a-4818-85fc-08dca80d5d7d X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2024 16:10:53.8867 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c/q6AXtr8gz0FsZ/U1fcd1Fsk3Du/tDvWPzh29gFO6Jlx2v1VC7DH5KOR8IQc8FENaNK4Xb4WtjVdYQwDyuW51Er0LQEwsbZXac6VKzKckw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR11MB7454 X-OriginatorOrg: intel.com 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 On Fri, Jul 19, 2024 at 04:31:11PM +0100, Ferruh Yigit wrote: > On 7/19/2024 2:22 PM, Bruce Richardson wrote: > > On Fri, Jul 19, 2024 at 12:10:24PM +0100, Ferruh Yigit wrote: > >> One option can be adding a warning log to the fallback case, saying that > >> memory allocated from non-local socket and performance will be less. > >> Although this message may not mean much to a new user, it may still help > >> via a support engineer or internet search... > >> > > > > Yes, we could add a warning, but that is probably better in the app itself. > > Thinking about where we get issues, they primarily stem from running the > > cores on a different numa node Since the private_data struct is accessed > > by cores not devices, any perf degradation will come from having it remote > > to the cores. Because of that, I actually think the original implementation > > should really have used "rte_socket_id()" rather than the device socket id > > for the allocation. > > > > Yes I guess private_data is not accessed by device, but it may be > accessed by cores that is running the datapath. > > This API may be called by core that is not involved to the datapath, so > it may not correct to allocate memory from its numa. > > Will it be wrong to assume that cores used for datapath will be same > numa with device, if so allocating memory from that numa (which device > is in) makes more sense. Am I missing something? > It depends on which you think is more likely for the polling cores: - they will be on the same socket as the device, but different socket to the main lcore. - they will be on the same socket as the main lcore, but different socket to the device. Personally, I'd suspect both to be unlikely, but also both to be possible. For the first scenario, I don't see anything being broken or affected by the proposed fix here, since priority is still being given to memory on the same socket as the device. It just opens up the possibility of scenario two. /Bruce