Message ID | 20241011081901.816211-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 30BF245B12; Fri, 11 Oct 2024 10:28:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E34F1402E8; Fri, 11 Oct 2024 10:28:20 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2082.outbound.protection.outlook.com [40.107.21.82]) by mails.dpdk.org (Postfix) with ESMTP id 4FE7D400D5 for <dev@dpdk.org>; Fri, 11 Oct 2024 10:28:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FNfmogSlok9mvWk5lR2RBu+D+aKYc/NY/JrEk/2AWUtOQDtm/GapZuXSQu4xYmstM3OqgW+NdI/flRrUIk4FySPqejYrcz4XntDIj1Cx+6lQlr4H0by5qm5LWyIyV0SDhD5XIrQxEH9WjEaAA/pI/JQq88wrRiAhsS1muxhVn53LLSZtTFdeY/YvNi/GBP6lz4+VsyY8mChspwGBvuU9eY6oG9R7NspmqcUMSEkhd+skWF3GCPMmJ0rJ1srQ5twMb4AmCPO0Z1Dg85yGD0IyQD2OpX/dvJL33SPJ8IP/Z+UPmKbFVh3W5xn2BU/koNDi1jZwQd/32Zfvw1qyzFtHjQ== 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=uAqgUzqxGk0KKyEOi6gXNwSfh+wfGTrJOuWboiE0Wu4=; b=j9yA98T7GrPr1hiumkqqhzrNlpHOfD66ROg7QA3CiNX34hKmgSdLUxbiqWL/OB5EmlYRVWBsEzNz4nQ3QCvS/lqUQ1c5mRt/6ijqRFKvG8gUH8EetSMtfm3IrQiqaE41Fl0IxypIPRyqPr/TtAoZu+toUYfz6BlH3wt3arVOCPWH70XLZbPB4zY8+JUm6TBlf19dEtyI4SbcvpRITmgPesFrZ+ovWeImS/fFO6KXXPUuag/z38mBHo4b2MP8MeIzYxIXCHvwTrDAfqnDxjrSMUG2c+oPOYJTG0T4HRnBTxOY07FNsaz43NVTlTBNxJZ+dPNuO8K9vH0Wy0Qu37fZaQ== 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=uAqgUzqxGk0KKyEOi6gXNwSfh+wfGTrJOuWboiE0Wu4=; b=KonPWrnjoW0y5EdwqAPW3UPCRrCV4s5pbV48635ftGSHBzJnkJpMuMEXf/jYeXTHxc5DniwCo3kcxqex+piA8OsKbwg13vOdPNHmL77q5krUstEYtfFMBli8FyaFrYTFoVHJt/h3B/ltsz5npbLBSp5GXzBkC5bHJ8w9HXzPDa3KgfcL1yjHZMazxuJSLBOwxCtdAq8qYWSVrRMIJfkfGup/NcuecBRO49dZzhGtFPZCmdrMhYozrvuwGyzQpJwRQtneW3MYVvNStzeRJZmXz0qtOEKjOQZyPeGeJjS+wFMgZ0fiCw6ivhvXr6+wX2+tyOr2+YrVzILF5+PmNOhkUA== Received: from AS9PR05CA0025.eurprd05.prod.outlook.com (2603:10a6:20b:488::20) by GV1PR07MB9117.eurprd07.prod.outlook.com (2603:10a6:150:a6::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Fri, 11 Oct 2024 08:28:16 +0000 Received: from AMS0EPF000001A5.eurprd05.prod.outlook.com (2603:10a6:20b:488:cafe::68) by AS9PR05CA0025.outlook.office365.com (2603:10a6:20b:488::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.34 via Frontend Transport; Fri, 11 Oct 2024 08:28:16 +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 AMS0EPF000001A5.mail.protection.outlook.com (10.167.16.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Fri, 11 Oct 2024 08:28:16 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.63) with Microsoft SMTP Server id 15.2.1544.11; Fri, 11 Oct 2024 10:28:15 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id A4E92380070; Fri, 11 Oct 2024 10:28:15 +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 v10 0/7] Lcore variables Date: Fri, 11 Oct 2024 10:18:54 +0200 Message-ID: <20241011081901.816211-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241010142205.813134-2-mattias.ronnblom@ericsson.com> References: <20241010142205.813134-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: AMS0EPF000001A5:EE_|GV1PR07MB9117:EE_ X-MS-Office365-Filtering-Correlation-Id: 11c5a0e5-8bb3-4d81-060a-08dce9cea77b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?0Gg96eU1D1rcQBmQh54iPY6YBlgI4UH?= =?utf-8?q?CHEE9iSNZ5ngFuerbnOMd6/v4+jA1g3z7k38W2szguvPV1WnaRwmqr0+6P3TK3LR7?= =?utf-8?q?PJ4Z9PkZC7fHes8aDm13egQVIxDm7q00Xz4ajYRv564PHvTAa9C3Wv8/08ntjoa+P?= =?utf-8?q?Ar8pdjvAZfwDbV6EQmU722ZN1N+3lH6f168S+w6ErSGAu3M3jviXQIbFrj+SxP/uv?= =?utf-8?q?LaCJVkw+nKqf0lAAjqRh38MHs4IjJ/woa20m+gRO03hf11AMxQFkne/4JRt8T8MSE?= =?utf-8?q?9Sna+dxp61XlGa9lY5//bb2peUE90sg1vhGnRA3zCgXf47xcnG//GSxdQk5IIM9n8?= =?utf-8?q?KItFMk1avNv0nahH9o62LpREzU2AgSjMDEA+GhFE3iO2lIKK0cw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K+ZiubzH2+ZFCeg/AgtVPCumefgtq+Ks4+1oMXGiKTe+Xr/E3sh/J1OyYZq6wG?= =?utf-8?q?oGWP4z2Vut6O?= 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)(376014)(82310400026)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2024 08:28:16.1691 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11c5a0e5-8bb3-4d81-060a-08dce9cea77b 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: AMS0EPF000001A5.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR07MB9117 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. 11, 2024, 8:18 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 adoption of this API would affect many different DPDK modules, but the author updated only a few, mostly to serve as examples in this RFC, and to iron out some, but surely not all, wrinkles in the API. 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 | 85 ++++ lib/eal/common/meson.build | 1 + lib/eal/common/rte_random.c | 28 +- lib/eal/common/rte_service.c | 117 ++--- lib/eal/include/meson.build | 1 + lib/eal/include/rte_lcore_var.h | 389 ++++++++++++++++ lib/eal/version.map | 3 + lib/eal/x86/rte_power_intrinsics.c | 17 +- lib/power/rte_power_pmd_mgmt.c | 35 +- 17 files changed, 1343 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/include/rte_lcore_var.h