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 4856545C57; Mon, 4 Nov 2024 04:16:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12239402AF; Mon, 4 Nov 2024 04:16:31 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2071.outbound.protection.outlook.com [40.107.93.71]) by mails.dpdk.org (Postfix) with ESMTP id 0E7404021F for ; Mon, 4 Nov 2024 04:16:30 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BpbQ/eH6SSNqp/8YroFE7ST0zYQV6FuTXzj31Z1xb6Nl3ZNByf5UYChSw1UQLUbYP4edNnfhg36UuRL7yUuoX4NtnccdmOagRmhDEJVixe/hvOjnRyEo9ezDa5sZf4zoVVa/z41C7UHt3jhnxxeLpxgyS4Mfe80AAjcCWtGKw/rCgIwR7ClOWcUWCFIjwtoJRoMrMkodoK6alBsP2HepKFq92swXuPfsU1fzGlJu4+Qp4R56np69Wi2XxaT7O1ExXo7gNjMvEVT9LsI5tx8ZoBZZ3BjOHognCOWY1jxzzBXND/MvO+cF8Y5GaBuuKGkLIKTVjjCit1D7GkZOTDl93Q== 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=I2X94p1JWJci8ok2iWCeX3YVqtqQ8YQgYiQ9dlyQ9Fc=; b=XD8IE7Tie8ovkL2CWt7VY4HrBa1l8zf+y8cPN4UgI/N+fUPOrCA6BN3ttTpU5+3dycBbnBrgcic5kpPYC7bOMn//ufDTVxxPGnyWRrwb2EQ23QG+DyoxcI72QOLwQqSSG64ug6Wi+Y7WDj4UD7dRHZe/9DtWC4tlOKa/PViK/HWC2l4rGLXbd8HdH/mgWyrCdSLSHKFODBJaBkJ+O/RCRV3rXRbh7jhn0WHy16M2FTWpQv9f+PgcvuKodPK99EIEmvhDrSn148YeC5Sh26eSPZESlvb88UAw4+4kHcPmkXnMXM54UV3UPdZQzB0/ZkCwG7GIScyV9fqxoNV3H8ab2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I2X94p1JWJci8ok2iWCeX3YVqtqQ8YQgYiQ9dlyQ9Fc=; b=X/+7RlFP7Odp2MPodG3Mv3Kmt++5IE0fUPhSWiiRfxioxVUaFz5MJtPfSARf4tvHE9mnOoHNhZnHDX+/fvgos755gstePzGVMnnxtUm+LGIJom8vQXXQhGqF5Qz6/QeoxXDL061VJypNNJ5MARP0N+v1p4w4RAJepCSzgY/MnoE= Received: from PH7PR12MB8596.namprd12.prod.outlook.com (2603:10b6:510:1b7::6) by CH2PR12MB4181.namprd12.prod.outlook.com (2603:10b6:610:a8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:16:26 +0000 Received: from PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::a011:943d:7291:8069]) by PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::a011:943d:7291:8069%6]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:16:26 +0000 From: "Varghese, Vipin" To: Stephen Hemminger CC: "dev@dpdk.org" , "roretzla@linux.microsoft.com" , "bruce.richardson@intel.com" , "john.mcnamara@intel.com" , "dmitry.kozliuk@gmail.com" , "jerinj@marvell.com" , "ruifeng.wang@arm.com" , "mattias.ronnblom@ericsson.com" , "anatoly.burakov@intel.com" , "Yigit, Ferruh" , "honnappa.nagarahalli@arm.com" , "wathsala.vithanage@arm.com" , "konstantin.ananyev@huawei.com" Subject: RE: [RFC v3 1/3] eal/lcore: add topology based functions Thread-Topic: [RFC v3 1/3] eal/lcore: add topology based functions Thread-Index: AQHbKo7TkSe1qp6krEGG1fG5vPPPL7KfcRKAgAcI5iA= Date: Mon, 4 Nov 2024 03:16:26 +0000 Message-ID: References: <20241030054133.520-1-vipin.varghese@amd.com> <20241030054133.520-2-vipin.varghese@amd.com> <20241030084759.2937bc4e@hermes.local> In-Reply-To: <20241030084759.2937bc4e@hermes.local> Accept-Language: en-IN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_ActionId=723ae80a-7d6b-4c73-b717-b719cc0e0575; MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_ContentBits=0; MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_Enabled=true; MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_Method=Privileged; MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_Name=Non-Business_New; MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_SetDate=2024-11-04T03:13:46Z; MSIP_Label_94523dde-f9d1-4aa7-80a9-c0900420d3c3_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR12MB8596:EE_|CH2PR12MB4181:EE_ x-ms-office365-filtering-correlation-id: 6a26e874-f3d0-435b-f573-08dcfc7f116c x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|7416014|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?b8TirQ9lFpYpSaECy2/4RNieNd7GzpTWsYD5Pq2lDE8cHoscxxshoJmyNy/w?= =?us-ascii?Q?962ekPlnAzGvXG2wy4S/Mi5tS4hzWJ1/9sSFGFTYTRqN2rAeDICXhetzC9FI?= =?us-ascii?Q?jC8zGokc43SmrqkKCrOsZn21TrEhePjcn/+8Co1DKIP2b0xNX3iz56d3GLYi?= =?us-ascii?Q?3noBU3mWbYVj8n6bovf+q1vrr3/6pynQYDb9fFP7epIntnzNEZ2N5MDkggne?= =?us-ascii?Q?qZKnzHuTpZRw5G5Pj6RLrDdfDzQSBGNMU+49xZoc0JChahKKMZSXYi1xkjBj?= =?us-ascii?Q?KOJhkz39UTnsFfN0oqoVSpXsQXZ/YwScBiqW17IjP2LyVjxcuBZHJW62u4TN?= =?us-ascii?Q?iWCpYpdkkS9ubE+Jyo29y+Ab+xf4JZxXDkMuFZ4eNu6m/aIvXXjKBBlywWXT?= =?us-ascii?Q?YHigrnFY2QQe4H2jaw0YIC72W4byUUP2idN/cNQhFuo1OqyUpQVaeUFMzsLZ?= =?us-ascii?Q?x8ZaIDMhJZmZb0Sh5pm0Xv7k92B6elWkoHT+PDXuLIQ3SlS81V9dxsWg4vKq?= =?us-ascii?Q?zOWeWefEcOP3Hpg8m61/rMvJDmdP0C1DJRcOigm0x4axX0uNaVl863P2Rgj8?= =?us-ascii?Q?sjZV7ndwVbhaWj+J+aFlSHQ6dM43ekcE1cj+sdqddoCx3S8KYVAqnvGiLdyq?= =?us-ascii?Q?LTxUxSv9NYzz0kgscaD7HVBlxrU7vVJo/wiVw6ezAtOsBIE04KUyaM1C8VmE?= =?us-ascii?Q?DyFAKhEbHlSN4iF5ik+830cFeMrUGNVuiXJu69KSMIlue49G4pkyqJnVrM4Z?= =?us-ascii?Q?6ROmZXtOBXQ2QIyvebTa9bOuNxGrdMNsxdUkNc2kjynzZ/r5KMNvzEQgcsA3?= =?us-ascii?Q?6ipprNDanNzWl/NKbm5Xy+r38WIGRGrCtkBMALIPmjulrA7u9WL6HmBomySG?= =?us-ascii?Q?Dw4ab8+qETJIQuYmikTxaUT4nzYFX9fFUWyFzEBEDmc2pR+8OD/waeynyFIj?= =?us-ascii?Q?MenfmPWt/P7u82xEchhBM4YEcnC6Pyb0+i4v71jef3yKMw9rtBKkLDHDgmBW?= =?us-ascii?Q?xfgqHAEgHwEnq5id3ONAsyjZWR2S9SZMH2iChBXlHTLkKmM2Q98de3eX28eN?= =?us-ascii?Q?tI7CQ4Xho2I1x3Ki0bd6wgyKIqcR0maVx+qm5rcYaYZq3HNC0d/3rOI1FZGs?= =?us-ascii?Q?xZ26i4sE59888kiDJupbWkxsvty1odXGpuLc79F103zrOam328fZCr1d6H2v?= =?us-ascii?Q?Xhz/xQ+X1P1LhAaGDbOwLaKgMtgrBQUdJGDzFebpG4qs+o0hz/QObVbA2Gwr?= =?us-ascii?Q?8ZJM3Pr/gJY54KwQ1AiDcUNovCr19ccaSebWlM4OM0Q9cIZeEd1QgODCJRhr?= =?us-ascii?Q?nRP6OJBVNWinXlxv/KXxCLZcltk9+zd5GQuVfkHCYi1JpP+RcaJxurDfw6ER?= =?us-ascii?Q?jMHYXo8=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR12MB8596.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(7416014)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?n4LjH1lj4S6S1q93g+faYP5ac3ZPJqwnD/aAAaOoZpf/yKKT00PTBrJ4Q0TK?= =?us-ascii?Q?4rUXUStYCq+/XD5h8zzgAc7dnw0ffWm7gQyMoknym/k7tVMOxT9XTYsYv1ru?= =?us-ascii?Q?vG/mWE/gluy28g9DwBx8gC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ydY05p?= =?us-ascii?Q?QPRqcDcjn7lOKgIV2LNCmSlSw0xJ1lNLxzJQJKOQYbyjjF6I+Fm/sGKGblqY?= =?us-ascii?Q?12PdPI7lGwa7VKQvjhQKABqEWbHaLOMw7SNTPf6yDrsNRUyJKnCgbJI08NhP?= =?us-ascii?Q?M/qvT8v9wQua8BHLCxRp/4nELfsoV4mUvpl9SuYLd4yl6l53WRiUUEvPC2WL?= =?us-ascii?Q?64eVFPKKNNCaFpD8sgRnar7Vt0dXoPTV26ul0Ew+SdIbLls6WQUOydpO7ogm?= =?us-ascii?Q?FRRP2sR2gYQmHCVJlZNAobKJvZxa0Z8ielbP/kIHZ6u0v9cXC7dBW+6jlHn5?= =?us-ascii?Q?brFRz7P46zIt4Tky/koPviXUcQ5G4DSdD+Z4hg4zs08JZEjdzSpzL7o4nDfD?= =?us-ascii?Q?wSIbojy2atK3eFWoCjireZL4JnTxdyOESkJTS0sej8nacpzgGRaF28DN2Rfq?= =?us-ascii?Q?UwO1U0zelUoWZ7e+hmqSFs5pcSUU/+D/t+7zeHlN8/Ed5yA9PDXVKiRqCHFF?= =?us-ascii?Q?ZsyKAsXoYfetfPw7XJzRv90g1XXAvfhzVzfWDDP7AOia3czY02IIFgPCCMoW?= =?us-ascii?Q?ma5IRZ6slYySDPb0Aas=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB8596.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a26e874-f3d0-435b-f573-08dcfc7f116c X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2024 03:16:26.2856 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MLiM/Sm2hegXc3n9jcOEo6J3pHUxZBYR9oSJsDQJHmup/neGku7cqngOdMdW6RJQR35JtSanMNh77HVGr6OtQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4181 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 Snipped >=20 > > +struct topology_config { > > +#ifdef RTE_EAL_HWLOC_TOPOLOGY_PROBE > > + hwloc_topology_t topology; > > +#endif > > + > > + /* domain count */ > > + uint16_t l1_count; > > + uint16_t l2_count; > > + uint8_t l3_count; > > + uint8_t io_count; > > + > > + /* total cores under all domain */ > > + uint16_t l1_core_count; > > + uint16_t l2_core_count; > > + uint16_t l3_core_count; > > + uint16_t io_core_count; > > + > > + /* two dimensional array for each domain */ > > + struct core_domain_mapping **l1; > > + struct core_domain_mapping **l2; > > + struct core_domain_mapping **l3; > > + struct core_domain_mapping **io; }; extern struct > > +topology_config topo_cnfg; > > + >=20 > To work with primary/secondary process model, it might be better to keep = this info > in hugpage/shared memory. I.e put topology_config into space allocated wi= th > rte_malloc() and populated by primary process. Initially we did use `rte_memzone_reserve` and moved it under `rte_cnfg str= ucture` for primary and secondary. Exploring on the use cases we noticed in multiprocessor scenarios, lcore of= the primary did not share. Hence we moved to using `malloc` as local alloc= ator. We can easily move to rte_malloc, but do we need to share the HW topology b= ased lcore grouping to multi-process?