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 D04F245B59; Thu, 17 Oct 2024 08:07:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FEC740664; Thu, 17 Oct 2024 08:07:15 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2050.outbound.protection.outlook.com [40.107.105.50]) by mails.dpdk.org (Postfix) with ESMTP id 590EE4027C for ; Thu, 17 Oct 2024 08:07:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BjHQ7bBjqoGv1TaxeY6lJzMG6rEyNrzZXQAYsaxtFmwCRuUZmhpF3APEz5ojwIfSuml9hRNOUZKuSlALpejbL94SyC2X2sZElCEeDxvRreKhQBZDTJHwJBtGL9QyaVNgMtcwLN+vKC+l/TwOETQ7Jcxhe92TLACmewXelC3FJZrO/jJGOw4j18dupk7ibk3BHLabpZGqXMlXpxDSsRibDzUZB40qjrr62EANTRFyC/Nyyo2D5faRW2vYibbRr5FhY9J4nfff06uc1/c7vQOobOhUEd5Sg9AbmlWdSRUPnaFAYVwIADl8Kk62tKcr4aSCbV1o8IIk+Apf3a1mVgH7+A== 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=Qw25Hex5OQwCd97j4hIU0WXNCvOelbqNgdLucbql8u8=; b=ZUBlDy5IjjZnAWSGcOzgAuASUcK+t5Dewm6Qky+S41SeN1NZbrav6QgEo5FODO+KILkwnTD+SbHd18AFEizD15SJLn8rNgv5OGwgAtBFw2g5d/jMfrweurgFhVqGmCW7uODZUpRtyYBpz+gGvLv7bJr/HhrzRdfpOMozWVUG6BJYiXKoI4m1z01ywlyuUv9hiBNH5G9Co+ZTT2p/Y9Bke7q9Tvj/u0WFjeY3obVwapuqKNBwOeSrrIl6Jqw6BbYwfKb8fPd0sX2MBN3j9i6yynB0668NvwjvBUytJaUCZ8ruv4NtEIc5FLu9jO6aERl0zCY0M+qoh5NyVVVZXgKqgg== 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=Qw25Hex5OQwCd97j4hIU0WXNCvOelbqNgdLucbql8u8=; b=X7KEEfEmJZysr1oVF/fC6hdLtfI7X23reQieoQJMAUi+/70eksH3eBNaAgQyuPekSFvQhp7Z5xmSbLRVlyfh5IiMVADIIg7d8elNa4d5ei1vwXjiywCZNB/LioXgwpb8MfJ3wMekygsmeQwV7s48WCFCzvjW0IPjpH9ysee+uLl5pUqHSHIMePS6np6pRHH3qDCJmcA2MmN5b2aTunUeLLjIvcON+nFPa1kihTO+XaEx8sQo6qFwBJA9ZvSuBcPKfTT79T7ZULW9IXV0z13IK2ev9k3e/fowkzLdpjEi/hDncHmImsUpfDpetgPHMz4mM0v0X3t6JIeuyznd7on7Lw== Received: from AM0PR04CA0130.eurprd04.prod.outlook.com (2603:10a6:208:55::35) by PA4PR07MB7488.eurprd07.prod.outlook.com (2603:10a6:102:c1::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.18; Thu, 17 Oct 2024 06:06:58 +0000 Received: from AM2PEPF0001C70C.eurprd05.prod.outlook.com (2603:10a6:208:55:cafe::6) by AM0PR04CA0130.outlook.office365.com (2603:10a6:208:55::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.19 via Frontend Transport; Thu, 17 Oct 2024 06:06:58 +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 AM2PEPF0001C70C.mail.protection.outlook.com (10.167.16.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.17 via Frontend Transport; Thu, 17 Oct 2024 06:06:57 +0000 Received: from seliicinfr00049.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; Thu, 17 Oct 2024 08:06:57 +0200 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id 227B8380070; Thu, 17 Oct 2024 08:06:57 +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 , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH v15 0/7] Lcore variables Date: Thu, 17 Oct 2024 07:57:36 +0200 Message-ID: <20241017055743.848292-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241016131916.827788-2-mattias.ronnblom@ericsson.com> References: <20241016131916.827788-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: AM2PEPF0001C70C:EE_|PA4PR07MB7488:EE_ X-MS-Office365-Filtering-Correlation-Id: 55a9857f-306a-45c2-41bd-08dcee71e85b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?RFd6MDROT1JxdFAvMHAvQ3NEM2RGT1NXSTF4SXBNblNpUzBEM1B3TDZFZG1z?= =?utf-8?B?VFF1R1RXN1Y3UXUwTUdyajRuMStLb3kyNGYxZXpEREhXdFBiL1IybnIyclFK?= =?utf-8?B?TlRsbXZpZURCL081ejM5MHhmNHFlVjBmSUNIelFiM0llM25KUVFBN3lvTlp1?= =?utf-8?B?VmRPM3FNK2RyWFh4S1dRREtwUzhBSzBRUjgzUHJLZ3NtSGRuRzltdUVHcy9o?= =?utf-8?B?T0hBcHVZT3o3TkdPYk8wWUQvNUFjMXRONUlhQ213byt3T0J3bXo0UDl3NmFP?= =?utf-8?B?TzV0T0xxb2F5b2pLZzN4em4wQjV5WlNuOVJFU2N1N2R3a2JBYWY5c295S1I4?= =?utf-8?B?eWY4cE5ydWREMnNuUU5XcjU1MlIrc24zU1N3WTB2RHptRXhQVHdjckFHUHpu?= =?utf-8?B?WGxrQW0rbkVzcG9LQ0cwUy9Ud0FMQjhGMGNBSERyYnc4Wisyb0ZXc0Y5VWZL?= =?utf-8?B?RU5xUk1CL3lrNklteDhiZUYzRlZKdm5uRmluemxmNHdyREFrN29wSEZ2Rk83?= =?utf-8?B?RkJ3VWVaeFlYR09sWStSMUwyVHJHNmdpM2g0MGRNeERFQTRid3o5b0Z4ZEdH?= =?utf-8?B?SGVjT2pPYkhKY1l1MEpwcmViM3A3T252Tm14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itpSHlDM1lTb3FBM2JBQzczTU9ib2w3eUNUdHY3QjluaUZXaEwrT0lk?= =?utf-8?B?ZWRzcDFiL0pEZDBpRGJnV0RaWDM1V0czdGpUbG1VRjdaWXdSek83TEd5c2pL?= =?utf-8?B?eUxjR2JFdmxrZ1loL1dEcCt1MHF1TkIwNk43SmdHUCt3SWpocEZNVEE0eldL?= =?utf-8?B?OTBBdXZZZ25RTWVFNFhpY1dza04wWG5LanE2TXN6cDczQnlleHlLTWxEU21M?= =?utf-8?B?QXFKNzErZWFQc2wwYUQ3N2M3WGJjSVNFdW0yazcvQVg2MGZrSEpzb0NCR1F0?= =?utf-8?B?L0pUdXZHM2N0RXhGQzZmVFJjZm9pZnRGSC9yT1FFVWpXWXpwcFRNbWFPRmJF?= =?utf-8?B?Q04xQXpXZktuLzJEN3djckQvWnBzc3o0aG41VGxDcTFzYXc9PQ==?= 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)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2024 06:06:57.6308 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55a9857f-306a-45c2-41bd-08dcee71e85b 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: AM2PEPF0001C70C.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR07MB7488 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. See for the rationale and comparison with alternatives. 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 | 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 +- 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 | 116 ++--- lib/eal/freebsd/eal.c | 2 + lib/eal/include/meson.build | 1 + lib/eal/include/rte_lcore_var.h | 394 ++++++++++++++++ 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 +- 20 files changed, 1409 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 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