Message ID | 20241015065505.823840-1-mattias.ronnblom@ericsson.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7DDAE45B40; Tue, 15 Oct 2024 09:04:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0695402A1; Tue, 15 Oct 2024 09:04:15 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2055.outbound.protection.outlook.com [40.107.22.55]) by mails.dpdk.org (Postfix) with ESMTP id 149334027C for <dev@dpdk.org>; Tue, 15 Oct 2024 09:04:15 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uqeN4lv2DscEFrFViJ2y07o+xpmQc0Pgrqm8YszymWXQgXPlw9oKLkIFnSb6K194h9zmny0VdpSlifx6Pm2ths9vwzieANarFDpGJMGwv5N2ZIDlhqkNNAusUwD6eEVvszN17PLXolRUZKkw1jjrLNbfjkJyCuFAAEbQfrjBH+60RqY4BWUiA4gAPHXkpGjs9rlXHW01BbbclXt+oT4pS8lCDts/MiVGxZhXRXCeRwqoJY/n1dh3Uwgfs76I8AU6vmMkyg2gyp+g6E/+OaUMAPhcdxzNooqG8cldsdnlJNp5z2K4SPqrS+YI79iXyKWpTI09FugKTT9I5nHnd+gTMg== 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=KFF6B8vmcwgEsYwNKe95PYqHgASKPIes68Xs+S24ugA=; b=gaNWR9b6pQAVskoETIzZQQ2SFyyJhwWp3T2DOOS0i8Ui3945fwxApAHB2BsWE5pIsKxHrWODakJK1UjfHlFIpXO0geWmpegO3BXvFRniMhyMswINRFWywotA7WSRujsGYhPw12IJJNExhM38m0QIAu7NlQt5X1axl0lSmbcV2lFNRFRCt9kcKu44NxapKyt22rddS1Bv6FaJ5ULPFwp+AIzLgZiCo9cldTcH7jwqhYYnxmpmbnuJkTMHGOeLJwhzaEmhR4LCZtD635O110AfRmKZ8CcmE7JeFD8jpcwfdHgjwrE3WJQK8z75wGpKASsavheICI+MqQBrnnbimURnWw== 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=KFF6B8vmcwgEsYwNKe95PYqHgASKPIes68Xs+S24ugA=; b=EjaEDRMx5M6ZgvN0oD8EuIn8waGyqN202cGQ3JEP63oPmEhPKGX97RqWdkJJWm5BWXA9+f8OfNu9C/w7ShHB+s5aHiJrQq+WP1hyuBEq+xE0259uWEZteLp/Vatr5MqdnmxcmFZg4KyMlQ9AW/YG1VOcXcL4grK9fIkSyJMgtmjGVfrxDP+W+mX5s/YIiG4OFH9ZiFNA0cXRWIzeSO2jOlk7mX1HFRvcQ+Yp8vOeeSESeA82GfHy9e7T65mnCb1GJ5KgAPWptMx1/Z59umtfq28X1ys0dJ04/MU1wG8AVyxRp7uJbgkpokpr4M+HFmM801s0pCyl09aLlahJ1qeYOw== Received: from DUZPR01CA0196.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::23) by AM9PR07MB7313.eurprd07.prod.outlook.com (2603:10a6:20b:2c6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Tue, 15 Oct 2024 07:04:12 +0000 Received: from DB1PEPF000509EC.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::81) by DUZPR01CA0196.outlook.office365.com (2603:10a6:10:4b6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27 via Frontend Transport; Tue, 15 Oct 2024 07:04:12 +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.8069.17 via Frontend Transport; Tue, 15 Oct 2024 07:04:11 +0000 Received: from seliicinfr00050.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.60) with Microsoft SMTP Server id 15.2.1544.11; Tue, 15 Oct 2024 09:04:11 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00050.seli.gic.ericsson.se (Postfix) with ESMTP id 2D2121C006B; Tue, 15 Oct 2024 09:04:11 +0200 (CEST) From: =?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com> To: <dev@dpdk.org> CC: <hofors@lysator.liu.se>, =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>, Stephen Hemminger <stephen@networkplumber.org>, Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>, David Marchand <david.marchand@redhat.com>, Jerin Jacob <jerinj@marvell.com>, Luka Jankovic <luka.jankovic@ericsson.com>, =?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com> Subject: [PATCH v12 0/7] Lcore variables Date: Tue, 15 Oct 2024 08:54:58 +0200 Message-ID: <20241015065505.823840-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014074348.821962-2-mattias.ronnblom@ericsson.com> References: <20241014074348.821962-2-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_|AM9PR07MB7313:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a00a448-2924-4b3e-4257-08dcece79267 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?q?0BS2LE/F0X9JK7bJKBL4fOPS2+tymDt?= =?utf-8?q?xoUku/eZx2wtTM3Fkr5KqguT3Y0hT4q5FeQcG3YNxWpJlUUPEh0ZCvgdpoWTfx9cS?= =?utf-8?q?x4K3lgKoza0Sl3gkyDzIHQLi1C6mPZY9xGc/P4F+KHczZwBORo8cTUlH+RBXpePHe?= =?utf-8?q?uMHW/DYEyngEQwCGzOzXvDJtRJfeR0wTQVfgjwfR1w4KucTBga2BahejhDnDo2SkV?= =?utf-8?q?Qh0/Pq/CqnZ8oMwmKSuCXEDCuRNvIQTAXN8phAordbzWBiNkzRsk4P1qwfzraMGuJ?= =?utf-8?q?kjGi1Zxu7vtXL874PW7+m8QjB9X8iHgParlbgXpiN1q/uk2zHeJD2AYg5XNLJGLmh?= =?utf-8?q?OTt293E/ffT5mAa/0z2ATOTgEjltl+r9FifXWlPiT2CzxjNjDZ36POUzXzKYRdfoC?= =?ut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BK?= =?utf-8?q?Fn6rU9VkQZxGXpolgCsNT7HSTGrf18vCbJVZjxsgr+HzqWdD+3W8OzzZRMlm/NIYq?= =?utf-8?q?FaLedT9QcyzB?= 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)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 07:04:11.6827 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7a00a448-2924-4b3e-4257-08dcece79267 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: AM9PR07MB7313 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series |
Lcore variables
|
|
Message
Mattias Rönnblom
Oct. 15, 2024, 6:54 a.m. UTC
This patch set introduces a new API <rte_lcore_var.h> for static per-lcore id data allocation. Please refer to the <rte_lcore_var.h> API documentation for both a rationale for this new API, and a comparison to the alternatives available. The question on how to best allocate static per-lcore memory has been up several times on the dev mailing list, for example in the thread on "random: use per lcore state" RFC by Stephen Hemminger. Lcore variables are surely not the answer to all your per-lcore-data needs, since it only allows for more-or-less static allocation. In the author's opinion, it does however provide a reasonably simple and clean and seemingly very much performant solution to a real problem. Mattias Rönnblom (7): eal: add static per-lcore memory allocation facility eal: add lcore variable functional tests eal: add lcore variable performance test 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 | 436 ++++++++++++++++++ app/test/test_lcore_var_perf.c | 257 +++++++++++ config/rte_config.h | 1 + doc/api/doxy-api-index.md | 1 + .../prog_guide/env_abstraction_layer.rst | 43 +- doc/guides/rel_notes/release_24_11.rst | 14 + lib/eal/common/eal_common_lcore_var.c | 138 ++++++ 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 | 117 ++--- lib/eal/freebsd/eal.c | 2 + lib/eal/include/meson.build | 1 + lib/eal/include/rte_lcore_var.h | 391 ++++++++++++++++ lib/eal/linux/eal.c | 2 + lib/eal/version.map | 3 + lib/eal/x86/rte_power_intrinsics.c | 17 +- lib/power/rte_power_pmd_mgmt.c | 35 +- 20 files changed, 1413 insertions(+), 93 deletions(-) create mode 100644 app/test/test_lcore_var.c create mode 100644 app/test/test_lcore_var_perf.c 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