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 6E39945BD4; Fri, 25 Oct 2024 10:51:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A7054064F; Fri, 25 Oct 2024 10:51:08 +0200 (CEST) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2071.outbound.protection.outlook.com [40.107.247.71]) by mails.dpdk.org (Postfix) with ESMTP id 8E7F24029B for ; Fri, 25 Oct 2024 10:50:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VN9WdFQGtKMcRUJ4QeKPfsWPz3dEEPna5pg2Iu8EM2EkF5XRnI3JF8P1kUZaejCCoE9kMEAvY8ObUEUMmDEYocYa7fvl6oXPOGaBgHVifW/f23wqYB/32xbVPHiRJJJijUPgqMQOryAQydV5jWyeBfKNSkPGGCDjBpcw/1tDEpRaBI22oayxpb65vQambQD44PLOZBF9z/hMhqYloIqe8P4BMeBGlVQ0wqbAjREkc2hvxA5Us6/5zI/Yud5gHfytS3VdeKXiuQehiEIZe1wYigQ6FZMyuq/+168+RMTvVLE1fICEb5ZqiCrX60Mf/SQ+Zu+v1lyNsCB8PAr9oK5D9w== 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=+tVz/ypm895+UMgqubaxSFJ1URY6UQgNnD6ECw3PnJM=; b=nkfS8CyO5va9YJJ3RsTa/eXk8WUYpg69vg78kweGsakl+B/1luGXOI8mt6XvX7g6zZdCJDNg4/y0thsWqQ3uFpvBKFCUFctxhDtltNcAEYjCLaQpva0/QAr1pq5/9+r5qWP+8xTsg3xPZGTXjJ+UtmpZecAl4xwbyvyHHvll9dxVAEIw4h1qLqXZiK5LzO8Zx9+vReG1IpnetFfOfYNTwnTWSqeustw7ZP8g7rhZOngv39sfhI40dTGTKX2Ug15bulW4xQvVwxWv5oDS9pWKJoNYBLlXNNUGyeBDArgdcSYEg/V9+dyhIlpIEoj0SCy1+IK65ElzakLqMwrqS4jUSw== 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=+tVz/ypm895+UMgqubaxSFJ1URY6UQgNnD6ECw3PnJM=; b=jYJGqrojO2n+yV0c9a7ZJXpfts2l7HM4vs+fkxoFyySwv3nva28yyMxyh5azReyhq1n4Qs/6yLBPuRdLK+PatQwBegm5gR+tudexnfxeREMfsaavQ9oiYd1MHWaQlHpTI2GyGydYlRIAi8ehxchQKQTzc0nLChHWacWkxxRW+FiL7LbT6hf3aBZMbGX8et3VU/NFIAvjPtqcjJM1vV/rQBRfsTpEmalh3cl8JjqVHnwsOBaVvGH6L7XDFRgf+kde7BvqoX7fpWL/SiCIQdD0Wr3QRsf1qlvb90PXygTDTBLHsE3FHzbwSzzmOMRBIExV7As1P6LhygD07a6ei6TWpg== Received: from DB8PR06CA0035.eurprd06.prod.outlook.com (2603:10a6:10:100::48) by AS8PR07MB7542.eurprd07.prod.outlook.com (2603:10a6:20b:2aa::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.21; Fri, 25 Oct 2024 08:50:50 +0000 Received: from DB1PEPF000509EC.eurprd03.prod.outlook.com (2603:10a6:10:100:cafe::6e) by DB8PR06CA0035.outlook.office365.com (2603:10a6:10:100::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.21 via Frontend Transport; Fri, 25 Oct 2024 08:50:50 +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 DB1PEPF000509EC.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.14 via Frontend Transport; Fri, 25 Oct 2024 08:50:50 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.62) with Microsoft SMTP Server id 15.2.1544.11; Fri, 25 Oct 2024 10:50:49 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id A94501C009D; Fri, 25 Oct 2024 10:50:49 +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 v17 0/8] Lcore variables Date: Fri, 25 Oct 2024 10:41:41 +0200 Message-ID: <20241025084149.873037-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023075302.869008-1-mattias.ronnblom@ericsson.com> References: <20241023075302.869008-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: DB1PEPF000509EC:EE_|AS8PR07MB7542:EE_ X-MS-Office365-Filtering-Correlation-Id: 699b241c-bfb8-46f3-74d9-08dcf4d22065 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aG0raWUrQ1RFai85SGJPaHRFUkZoZjRmNjVGRVZaT1RmUVlaT0d6K1NqeE83?= =?utf-8?B?Sjhobmp2M2tMZ2s4YnBjVnVJUERkd1pIdHpGbXhOQXR6bDkyODJYSVRaL2dK?= =?utf-8?B?dHBrZDFCbzZySVIxWGg2bWtWdWRtZEloVVNFSXJtNkRYT3c2amlGN01wbWx3?= =?utf-8?B?NmUxZmF4cFJNMHpvSmhnNnY4SEZwejlOMGpHdEEycDdRRG1QaU1RS2VOdFRz?= =?utf-8?B?UVNSSk5aVjVUWC90VHZBa3g3Qlh0ZVBxYlZWSVJqS1dLeTloejQvRnkrTGRi?= =?utf-8?B?ZEJUdjZ0ZTJSRXlTQWxFNVVOdXRndU1ucmsrUE04SmhXZWJFYjRSalpSMzFF?= =?utf-8?B?TjhoTjdaaWc4YVhobjZ5eTdJWEh5NGZoZU1BNWJ2N050N1RSdUFpcDA3TnFv?= =?utf-8?B?b3I4NWNjKzhNekUzemdjc0NhNzRmaGJQcTNoYTdOcHl2RTJ5UUtRdEFVUzRw?= =?utf-8?B?dXIyTlF1NHpVZzcyb25aRDFSNFBBQmlaOG1vdWkvUkJSc0RreEgvNUVZamkz?= =?utf-8?B?ZDUvRzRGclFlMk01VWl0eHIzQ3pYY2JRaW0vTjVOL3NpbnJLbnh5K0lIQUxX?= =?utf-8?B?bmhGT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?utf-8?B?MlF2WHliWlY4d3FHd3pzOXEzNFhmQ09UU0kzclRNS0RMK0JvK3E0cUR5Ukd2?= =?utf-8?B?WXpYNE1qUmZHL3p0YzhjZW9QMEEyTXZIUmpuMHA4LzhzOGtsNGdSME92eEtO?= =?utf-8?B?WW9uYzEwREVUUi9ieE5OR0NSZ3N1Zjl6V0tVNVFFQlR3a2w2dk95U2hvaXZx?= =?utf-8?B?WEhZdmxJQ2FvRHYvcURVUVdpQkRPQXQ2aWNnbHF3MjBmNkxpcTNsL0RZbnJw?= =?utf-8?B?NUloS0lEYjA5Tm9CcWZKYmpIU0NDVDhWNVBKSkE5N0p1aVdjbHdHMkhKazdS?= =?utf-8?B?NUVhMnNZUHdMYlF1RjFRMFZHV3h1dDZFekU3MU1ZWWdTMXhKTThGaDdxei9v?= =?utf-8?B?TkJIemE3V0pIcWdvSllUTDZKbUNxZDJMUGFsRHBxV2QyNHc9PQ==?= 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)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2024 08:50:50.2816 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 699b241c-bfb8-46f3-74d9-08dcf4d22065 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: DB1PEPF000509EC.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7542 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 | 551 ++++++++++++++++++ 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, 2336 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