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 5107045BAE; Wed, 23 Oct 2024 10:02:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4757D40EDF; Wed, 23 Oct 2024 10:02:17 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2082.outbound.protection.outlook.com [40.107.22.82]) by mails.dpdk.org (Postfix) with ESMTP id 9EE7E40E3B for ; Wed, 23 Oct 2024 10:02:08 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PYs2qkiXZNfAV6abJ+UPMgoW53u04SsNyIXYNuLdmYitE7/leapLCZE96uLqbWva60ZE3sl5T4/ski0MpvKnSwofHQNUb18S6UNinnEhMWipR0yMdZH5EAKQGX+AZwTOh+0EUmErsdCceeSYXIDFsYdVcWd7mKjzvTeQrPXiLxSKJP2d83bXd3AKsnYFAfnfQ6iduaJbGRtX31FQvYaRuSSOhxCDRIJZY98mZG/3M+Nmnd0dGZU5tVjOEV51LCh0yQFpXpBaa6tGZKQBoMzUAkFJLF6nQNf8EtDFYbj0fBSGf2tAjn0xE/bvB1ZlNNmsHhsG+/S6icxiDetTpF3/tw== 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=/R+wi4Ql2bYYwRAjAjIs+zs0OYSdups9Y2sfd7wze5U=; b=djmq6dpK1bxdB6mmhsAh0gAT/CFEjjA0kSwpL4AwOowchS0Fbd5mDGEauVTFCR3cg017rfLbM0Qh/XvYCOApchKj5kTdTKpLAa+aj3Jpm2ZOND3ijp+hqV+dOtEaIP8RIIaAtDpCPuzSWl5oED3NUvX3MiMo9Eda/u/ziBImUJQn9W2+viL5IACVI6plIql/vHDY1jeW8imxnuPHnrV8Tp5RrcMHIHjaL+J9APHzNHBHAWGtM0L0/JSwO4qNKvc+U0Hy2O+IKnXlRYb3l4H+7LQ/71erKY/H6xUC4sXKJH1hx+MfUBofrggN83j1SBamy3MC2TMSqudFkKwCBs27Ig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/R+wi4Ql2bYYwRAjAjIs+zs0OYSdups9Y2sfd7wze5U=; b=s0IDMO51hyTMgL0A3xsLOysecddfRkIEOPR11g/jmbNP8+82aF7LaFkDGTSFpxyNIh+Bg/Wynrx7Mjel4FUKVqxXTfS6+cgLgQvihe+waMK9FeuCNEWQT6fbMiyH+eb0ul+dN3mR7oNtPVT04HAeqZpPu6OIKgzcCN+LZ9vmOPY94erLdxi5hm1GFD0A3xkzKKgWZHnuSOuDqMOmRlW3V0NQ7ql1eKsGzseJfi32FZjMr22UegRSKkX8hVtGnmRvSqbuflw34Vb16N9kmY7DLvwzUGhImHLwdzHJr+rNePgF/j/BAdbkxtLmIkl8kBzQWkpQri2Ru2sdK4a3Jpo37Q== Received: from AS9PR06CA0343.eurprd06.prod.outlook.com (2603:10a6:20b:466::26) by GVXPR07MB9872.eurprd07.prod.outlook.com (2603:10a6:150:117::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Wed, 23 Oct 2024 08:02:06 +0000 Received: from AMS0EPF000001B7.eurprd05.prod.outlook.com (2603:10a6:20b:466:cafe::26) by AS9PR06CA0343.outlook.office365.com (2603:10a6:20b:466::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Wed, 23 Oct 2024 08:02:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by AMS0EPF000001B7.mail.protection.outlook.com (10.167.16.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 08:02:06 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.67) with Microsoft SMTP Server id 15.2.1544.11; Wed, 23 Oct 2024 10:02:03 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id EAB613800B8; Wed, 23 Oct 2024 10:02:02 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Stephen Hemminger , Konstantin Ananyev , David Marchand , Jerin Jacob , Luka Jankovic , Thomas Monjalon , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH v16 0/8] Lcore variables Date: Wed, 23 Oct 2024 09:52:54 +0200 Message-ID: <20241023075302.869008-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241017055743.848292-1-mattias.ronnblom@ericsson.com> References: <20241017055743.848292-1-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001B7:EE_|GVXPR07MB9872:EE_ X-MS-Office365-Filtering-Correlation-Id: 11bcb87f-6168-4b1f-e983-08dcf338fc9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?ZVZUQVNjY082MHJ3dUNKeWwzeENzUkYxanFsRHV4Y2M4TktOMUwyTlFXamR3?= =?utf-8?B?TWdTWThCeGV1a20rSHRhYU0yZzhzTEI1alJaUDhHUUJqaU1IRno0WmMwUElB?= =?utf-8?B?M0pjdEhWVEcyQmFOeURhT0Zpa24rMmMxV1pGQWx3dUQxYWM4dDB3ZU04aVk3?= =?utf-8?B?WTBSb3NvcjVaeWZXb0V2TFBsU3pyR3M5c0FoQTdHcVhBOWdlVm1KbFBuK1Fv?= =?utf-8?B?YjN1eEErcUFvY1pad1lkUUJac3pGNmFGeFRPdm9ZZzdkajkvZ0x5M2ltYzhE?= =?utf-8?B?em91eFR6WXYzK2FhKzZZbTBVTllVQ0o0NUFkVVR4ZEsxd25ZUEdYY1pwYU9B?= =?utf-8?B?K3Y1YVVpTG9ZTTE1S0VSNHF3S1IrN0FFd1Roa1Y2Q3V5UGZKZzRVVHhxMytQ?= =?utf-8?B?QjI5ZEVJaXR1TGdQNlNpVjZCUnlBc1N1QVVKVUw5clJ3Z0lpUmF3dDQyMUtB?= =?utf-8?B?Nk9MeHhjazN4TVVTdHVzSDBNbzA2c2FScVpTay9tRmtycnNJUnRGQkxCWk91?= =?utf-8?B?NFhGcXVnZ1AxejRjMnl6NWZ1UDVuU0svWXQrdWlTSkVYM3g0dDM0eWZacl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WVpSUDJMV1RITG0vZzVST29Nb2ZPcFkvMEZD?= =?utf-8?B?YVE1dEdYbGhrenhMdXBod1g4Tk9ZNkZLU3U4VXBUbVFES096a3labzdUV0xW?= =?utf-8?B?MlZ1VWF0Q01zc1pjK3U4NDVWWnYxdjJwdjNFM1VZYS9VeUI3dU9BSmZxU1B1?= =?utf-8?B?bFI4VHhHOWE4YU11U2ZxN1Z2eG5KMXpEcU5DcUxTUVk5Ym9SL0VVTE1Sa3JO?= =?utf-8?B?UnBSNVZmTjh1b0k5djZPS24waHM3TFFPR0NMcHVMdFcwdlFwejNsYmJWTVp2?= =?utf-8?B?c3V3YjVldGU0YTRXQzdmTUxrekpCUURXSTlTcTJGYWFyejBkMUNNWHFzd1lw?= =?utf-8?B?U0FGYTgwQUkyWjhpNklSZmFRS0tFTnN2QnYrWGUrYXYraDVXZWxSOXNvb2hx?= =?utf-8?B?aVRFdkNWNXBUeW5td2tSclNSMFFjdnprZmVkY2dPcktneVE9PQ==?= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 08:02:06.1354 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11bcb87f-6168-4b1f-e983-08dcf338fc9f X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF000001B7.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR07MB9872 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 This patch set introduces a new API for static per-lcore id memory allocation. Lcore variables are designed to replace static lcore id-indexed arrays and thread-local storage. Refer to the programmer's guide for a rationale and comparison with alternatives. Mattias Rönnblom (8): eal: add static per-lcore memory allocation facility eal: add lcore variable functional tests eal: add lcore variable performance test eal: add lcore variables' programmer's guide random: keep PRNG state in lcore variable power: keep per-lcore state in lcore variable service: keep per-lcore state in lcore variable eal: keep per-lcore power intrinsics state in lcore variable MAINTAINERS | 6 + app/test/meson.build | 2 + app/test/test_lcore_var.c | 432 ++++++++++++++ app/test/test_lcore_var_perf.c | 256 ++++++++ config/rte_config.h | 1 + doc/api/doxy-api-index.md | 1 + .../prog_guide/env_abstraction_layer.rst | 43 +- .../prog_guide/img/lcore_var_mem_layout.svg | 310 ++++++++++ .../img/static_array_mem_layout.svg | 278 +++++++++ doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/lcore_var.rst | 548 ++++++++++++++++++ doc/guides/rel_notes/release_24_11.rst | 14 + lib/eal/common/eal_common_lcore_var.c | 112 ++++ lib/eal/common/eal_lcore_var.h | 11 + lib/eal/common/meson.build | 1 + lib/eal/common/rte_random.c | 28 +- lib/eal/common/rte_service.c | 116 ++-- lib/eal/freebsd/eal.c | 2 + lib/eal/include/meson.build | 1 + lib/eal/include/rte_lcore_var.h | 207 +++++++ lib/eal/linux/eal.c | 2 + lib/eal/version.map | 1 + lib/eal/x86/rte_power_intrinsics.c | 17 +- lib/power/rte_power_pmd_mgmt.c | 35 +- 24 files changed, 2333 insertions(+), 92 deletions(-) create mode 100644 app/test/test_lcore_var.c create mode 100644 app/test/test_lcore_var_perf.c create mode 100644 doc/guides/prog_guide/img/lcore_var_mem_layout.svg create mode 100644 doc/guides/prog_guide/img/static_array_mem_layout.svg create mode 100644 doc/guides/prog_guide/lcore_var.rst create mode 100644 lib/eal/common/eal_common_lcore_var.c create mode 100644 lib/eal/common/eal_lcore_var.h create mode 100644 lib/eal/include/rte_lcore_var.h -- 2.43.0