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 8042A424CD; Tue, 11 Jun 2024 15:16:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1034F40263; Tue, 11 Jun 2024 15:16:48 +0200 (CEST) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2087.outbound.protection.outlook.com [40.107.249.87]) by mails.dpdk.org (Postfix) with ESMTP id 133104021F for ; Tue, 11 Jun 2024 15:16:46 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DavNvOs/UgSRPeiYVX69RiV0rBSc4UTVtffSTqGjA9QIDXxGTuADjcrZa7JLBskrpSrjxk949KRDOo0sEKkYsq7Ti3lU/ZmpSnW/qC+UOtMdKl7aRZascFMsKMDd0DzfKarPKkXIgwFvWYMxFuqOtnfGs3bvDFrSEksH2BWOqNkewc9V7xSWj5RFwGMUPFkFqKwmwu8tzaQ7ivn590rBqSCChEfTXMYuc55yMrfG7QilnzZmA7uWC2Hxxmh74iz+ASINMdEgKtykSz+UFF8d8svvihwoZ/2xxHmDSX2fy+G3I4jQJPWpZLzrZ3Ac+KoeBJ09658munZTGL0J8TTQkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=YyI/WEcNfZWecwAAoATBQyfFoywJMijVc8UXfgUGbww=; b=LjE7a2EIaqlsmeeW8xw+CDhD8xlpP01mmvQvc58BSDxDd/nQl31PYH5MiBJ2YmkYzWzusFRpRNUMSa8w+gzC3oCUFueqkenTS0RrYYpGDD96sDLYh/dacio4kgzpx124/prle1Bo70R7idvynnZejRYBGxWJWAeE+++V6x/KMOdT5conKFZsS9Rk37jOUjb1eKa+qYFwmg2InesSF15SdqLr6eKr71ZESYJrM7T4e5ggFIk6lYAei6rBMjzObpoa2AAEwoQCaIkaKuzf1pPXtdD0nvAz+4IwCI59PVWlg5+264dzkbVFFgBk7Sv9MXC9XXDXihkzW0GEmxOuiA/fBA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YyI/WEcNfZWecwAAoATBQyfFoywJMijVc8UXfgUGbww=; b=OUYwrTzHRFK6mnX+fkAbcYU5/OodO0WTQ6LrXhLI7JWXc60IBI5fTax1NeatV73ghvevcj1S4zJlCilImQXkF8rMkyS8CTl17tISLLBP5iE/1qUB/NbS9tozZyekwhJ7KXq3YtgMybaT7UX0slR5m15gFm6MRfIIlaOHROD7vjU= Received: from DB7PR03CA0104.eurprd03.prod.outlook.com (2603:10a6:10:72::45) by AM8PR08MB6356.eurprd08.prod.outlook.com (2603:10a6:20b:36b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 13:16:38 +0000 Received: from DU2PEPF00028D00.eurprd03.prod.outlook.com (2603:10a6:10:72:cafe::86) by DB7PR03CA0104.outlook.office365.com (2603:10a6:10:72::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.26 via Frontend Transport; Tue, 11 Jun 2024 13:16:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF00028D00.mail.protection.outlook.com (10.167.242.184) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Tue, 11 Jun 2024 13:16:42 +0000 Received: ("Tessian outbound 2ded0d7f80d7:v332"); Tue, 11 Jun 2024 13:16:41 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ac9c9ef84d37894e X-CR-MTA-TID: 64aa7808 Received: from e0ed61295f1f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E17A1462-6ED4-4345-8DA9-5086683481D5.1; Tue, 11 Jun 2024 13:16:31 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e0ed61295f1f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 11 Jun 2024 13:16:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZbA6g4N63+O+FXEQ5G4lTkNH2CufQAZ3Y7BeLt7vsMX73GXgsQam3d4G72WqtF+nB4OdqqkOsg6Tr37mieNU3nFGwbSH6CAyRp8ankiFCKM+me0myv9HgUg9tOLTHSj6VWxMLJJvpR11TVVDIee65lqQHKFKsabbKqKKEzQwndi77OF4R+B7ljtDEq0XT+sUfVD/3GamPvCBj7pqaucFBdVO7Usca5Cr17+Q/mhiKbM4f4M7hoB0bQU0sy+mT/MWOjBCWVvxGd4z8Ji5kQj/QqABD0XtNm25IvnriDPr+ELHgHhcodn6xAcinaO4thSe9qRnFYof4akP6NV1rt6+rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=YyI/WEcNfZWecwAAoATBQyfFoywJMijVc8UXfgUGbww=; b=Ex821L+JI030F/JItZUr7llrv4D2CWWXF2T/UxSxL4eP6tMv1BXVtW+a9E0cNiyDboq61CMu4NWhhZ2p1myaaKkzRXSM7j33mikxZ8Ne39vSqkzHATUM3NBFLlmCG+VGi2aNH4D6US7VnCNCYFp73eBrSet7+koZVi8E9r3cWgbw/UMpwIg+08B2fP5ktMDtZuGO3qhwofgIa8LvPTG6QYPkcjYWh0/wV5GVodP5qpR82hcBqQLTU3G8yxCdWhUCpMdiwhI39CawURb4RhIlKvyzBtI/tgmp/WGnLXWMukcZNKY6NAwsJbazWGriYRgCFPDbCLBRgAzkCcxGswNpIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YyI/WEcNfZWecwAAoATBQyfFoywJMijVc8UXfgUGbww=; b=OUYwrTzHRFK6mnX+fkAbcYU5/OodO0WTQ6LrXhLI7JWXc60IBI5fTax1NeatV73ghvevcj1S4zJlCilImQXkF8rMkyS8CTl17tISLLBP5iE/1qUB/NbS9tozZyekwhJ7KXq3YtgMybaT7UX0slR5m15gFm6MRfIIlaOHROD7vjU= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) by GV2PR08MB9376.eurprd08.prod.outlook.com (2603:10a6:150:d0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Tue, 11 Jun 2024 13:16:26 +0000 Received: from DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::2dd2:fd4d:8ff5:3733]) by DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::2dd2:fd4d:8ff5:3733%6]) with mapi id 15.20.7633.036; Tue, 11 Jun 2024 13:16:21 +0000 Message-ID: <91a88d1c-9604-48b9-9426-64c2c2b8ac52@arm.com> Date: Tue, 11 Jun 2024 14:16:19 +0100 User-Agent: Mozilla Thunderbird Cc: nd@arm.com, dev@dpdk.org, mb@smartsharesystems.com, Honnappa Nagarahalli , Kamalakshitha Aligeri , Nathan Brown , Jack Bond-Preston , Thomas Monjalon Subject: Re: [PATCH v14 3/6] ptr_compress: add pointer compression library Content-Language: en-US To: David Marchand References: <20230927150854.3670391-1-paul.szczepanek@arm.com> <20240607151000.98562-1-paul.szczepanek@arm.com> <20240607151000.98562-4-paul.szczepanek@arm.com> From: Paul Szczepanek In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0374.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::19) To DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB4PR08MB8151:EE_|GV2PR08MB9376:EE_|DU2PEPF00028D00:EE_|AM8PR08MB6356:EE_ X-MS-Office365-Filtering-Correlation-Id: 3da24adc-956e-4bd6-f7ce-08dc8a18bc5e X-LD-Processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?ako5WThVOEduQTEzNXJSU0t1bllkdGdrZlM0cUJ1YUlmYmlQemxxOFRVL2lL?= =?utf-8?B?N3RHaWt6SzQ4MEZPVmgwWndTY002Z2ozVlJhYXE0SG92UHJiejZkbEVwQ2ps?= =?utf-8?B?SHFHQU5oOENmVHVXZWh5NzNONnV5UFFGZ0VOdkdtQlNXN2JVYURCY1dTdkZH?= =?utf-8?B?b2t2QnU0K2NPNXQzN1ZaeXhmbCtZRGlTQlRQb1VRdEZST1B3bVFkSit4V2R6?= =?utf-8?B?WXhBTmtRbUxkZWVlUlFDcW9zSGM5Q3MzK3BtMHhSekRTRWE3Yzk3RVpVY003?= =?utf-8?B?Q0xhbDIvMWNZeTFkK2pYd0E0d1VDUlFXVEpzMDJiRWNmdlFQcXlnWWgxQm0z?= =?utf-8?B?OFQ3TS9lOVpGZDkvdnQ2YmZFbGN2cys0dndHSGNGV043ek5qR2xjRGZ0dFJk?= =?utf-8?B?ZXQwbC92WnAzTDI0bmM3eERMUkEwcTl1L2lqRC9kK0hYbCtCY0ZaTUNUc2Nr?= =?utf-8?B?Skl6d1pmNW5LQWlROVE5Z3ZmVWhFK1J4eE9FaTVhY1BLZGVneDh0eXI0Z2NH?= =?utf-8?B?Z1B4cjVLTEJFaXk4RjA3TTAzeE0wVCtoWTQwMWdGNTBWdm0yc0tUVExGQ2NL?= =?utf-8?B?bEMwV3k1bG5LWFlSaVo4N2dEVk5uYVdBdk1zY3JPODBTMmphR3BWb2p4RTlj?= =?utf-8?B?LzgxYUlqa0ZxQWsvWmE3b2x2ZzU5TXFoTS82MGZDQVFNWDhhaG1NQ09iK1JH?= =?utf-8?B?eitpbXkxTDd3TWo4SjBCdGtJdmNTemxqRW5FM09LVWRYWjhDcU9VaWZleTR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l6NVdudVRNcm9ZcmV1cHlTbjdD?= =?utf-8?B?Z2R4SUtZNm1tUnpkR3Z4cGxPbmxiMGR2S3FDczI3TWIxNTVURmhWY0tLMmhi?= =?utf-8?Q?DBE9UDrCwuxfvmcKkj6bYiPd/z/30CCUI9BJZGi?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB4PR08MB8151.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(1800799015)(366007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9376 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF00028D00.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2b83b109-2677-4c6f-fbb6-08dc8a18b009 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|35042699013|1800799015|376005|36860700004; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aEZEQnRzUWk3TFpRY1VDdVNYeU03ZW10UE5ScEVYa096T2V4OEp3cWE2OWFr?= =?utf-8?B?SlYwajcveWVHZGg2QkJsckl0aUtEbkhWNWlDaU00UGJVaVZuUS9jUkN0Y2Vm?= =?utf-8?B?NTZiSTcvODBrR3ErcUFwZTdyVUxxem8vQ0xEQ3NIQ0FsVUVRNEJZdDBJVHZn?= =?utf-8?B?cW1FRDRMdXYrSVR2ME8rbzRsTWl0bFZPQy9GRTJoTy94aDZkK3RKcE5RNTNr?= =?utf-8?B?T1lPMFJZQm9wNkVpZWFOY3YzcWdrZmQ0L0trRUZFMFkwYk15MFBxeEdJeE02?= =?utf-8?B?eWU3U2YxVGFGTEpCLzBWS1BYOWFSWGZDZEZramVZa21jVXo0UmxUMlVNem02?= =?utf-8?B?bkFG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yR0Yw?= =?utf-8?B?MHluTm5MRjlQR0Y0QjZObFdmOTZZSitJK2FjZ2NBQ0haTFhwZHNuRFBjcG9C?= =?utf-8?B?K3I2a2lEMEVpMVpRMVAxTGJHTHMxTDQ1MHhuSnFvTnlGRjAvR0hIOEFIc0li?= =?utf-8?B?MFBzbDJiWE1YUys3eFdyVjBVa1o5aWhWZ1F1eVhUYkVtRFg5ditiTmJ1TnVa?= =?utf-8?B?T080OHNGN05TckMzV2FUV2E2WFZobC9LVG83bEQzT29sR1pBMmNWdFBDa29p?= =?utf-8?B?SDNsd1hwY3FDb2swUkFHUXVsMFdzQ2F6eFNqNFVWRVJYR2hHQ1h2UDVYUTFz?= =?utf-8?B?Z3pkWkJTNjZaOHkxQmQwbC84SG9qNDRtN0xHZnQ0b3lWQ2d4TUIwVEVKS1FJ?= =?utf-8?B?OW5EZkFnMXBUcldWM1Q0UDVUU0pOUVJJSE9WbWgrQS9aQVo4KzJjdGpubXpa?= =?utf-8?B?N0NqS0NOS1VMR1RmZG1DSmt5amN1bUZxbG5NRk5xOExNN2w3eHQ4cEdwZS9z?= =?utf-8?B?RUlTdGUrZzMyK29JMGNKNWppL0M4NVVGaUdNV2I1R0ptc0lVblVnVjNmSW5P?= =?utf-8?B?a2NnNm5mNVFqMVV5cTJXWjFvRWFlUCthUFdXMEw1OE9iWStldXk5WDFSTThx?= =?utf-8?B?S3lrNlJYZ0ZvdTIzRHROMDg3akc2eTJFQzJWZnBCRUFicFE9PQ==?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(82310400017)(35042699013)(1800799015)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2024 13:16:42.3331 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3da24adc-956e-4bd6-f7ce-08dc8a18bc5e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D00.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6356 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 On 10/06/2024 16:18, David Marchand wrote: > Hello, > > On Fri, Jun 7, 2024 at 5:10 PM Paul Szczepanek wrote: >> >> Add a new utility header for compressing pointers. The provided >> functions can store pointers as 32-bit or 16-bit offsets. >> >> The compression takes advantage of the fact that pointers are >> usually located in a limited memory region (like a mempool). >> We can compress them by converting them to offsets from a base >> memory address. Offsets can be stored in fewer bytes (dictated >> by the memory region size and alignment of the pointer). >> For example: an 8 byte aligned pointer which is part of a 32GB >> memory pool can be stored in 4 bytes. >> >> Suggested-by: Honnappa Nagarahalli >> Signed-off-by: Paul Szczepanek >> Signed-off-by: Kamalakshitha Aligeri >> Reviewed-by: Honnappa Nagarahalli >> Reviewed-by: Nathan Brown >> Reviewed-by: Jack Bond-Preston >> Acked-by: Morten Brørup >> --- >> MAINTAINERS | 4 + >> doc/api/doxy-api-index.md | 1 + >> doc/api/doxy-api.conf.in | 1 + >> doc/guides/rel_notes/release_24_07.rst | 5 + >> lib/meson.build | 1 + >> lib/ptr_compress/meson.build | 4 + >> lib/ptr_compress/rte_ptr_compress.h | 324 +++++++++++++++++++++++++ >> 7 files changed, 340 insertions(+) >> create mode 100644 lib/ptr_compress/meson.build >> create mode 100644 lib/ptr_compress/rte_ptr_compress.h >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index c9adff9846..27b2f03e6c 100644 >> --- a/MAINTAINERS >> +++ b/MAINTAINERS >> @@ -1694,6 +1694,10 @@ M: Chenbo Xia >> M: Gaetan Rivet >> F: lib/pci/ >> >> +Pointer Compression >> +M: Paul Szczepanek >> +F: lib/ptr_compress/ >> + >> Power management >> M: Anatoly Burakov >> M: David Hunt >> diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md >> index 8c1eb8fafa..f9283154f8 100644 >> --- a/doc/api/doxy-api-index.md >> +++ b/doc/api/doxy-api-index.md >> @@ -222,6 +222,7 @@ The public API headers are grouped by topics: >> [config file](@ref rte_cfgfile.h), >> [key/value args](@ref rte_kvargs.h), >> [argument parsing](@ref rte_argparse.h), >> + [ptr_compress](@ref rte_ptr_compress.h), >> [string](@ref rte_string_fns.h), >> [thread](@ref rte_thread.h) >> >> diff --git a/doc/api/doxy-api.conf.in b/doc/api/doxy-api.conf.in >> index 27afec8b3b..a8823c046f 100644 >> --- a/doc/api/doxy-api.conf.in >> +++ b/doc/api/doxy-api.conf.in >> @@ -71,6 +71,7 @@ INPUT = @TOPDIR@/doc/api/doxy-api-index.md \ >> @TOPDIR@/lib/pipeline \ >> @TOPDIR@/lib/port \ >> @TOPDIR@/lib/power \ >> + @TOPDIR@/lib/ptr_compress \ >> @TOPDIR@/lib/rawdev \ >> @TOPDIR@/lib/rcu \ >> @TOPDIR@/lib/regexdev \ >> diff --git a/doc/guides/rel_notes/release_24_07.rst b/doc/guides/rel_notes/release_24_07.rst >> index a69f24cf99..4711792e61 100644 >> --- a/doc/guides/rel_notes/release_24_07.rst >> +++ b/doc/guides/rel_notes/release_24_07.rst >> @@ -55,6 +55,11 @@ New Features >> Also, make sure to start the actual text at the margin. >> ======================================================= >> >> +* **Introduced pointer compression library.** >> + >> + Library provides functions to compress and decompress arrays of pointers >> + which can improve application performance under certain conditions. >> + Performance test was added to help users evaluate performance on their setup. > > Please, double empty line before a new section in the release notes. > > >> >> Removed Items >> ------------- >> diff --git a/lib/meson.build b/lib/meson.build >> index 7c90602bf5..63becee142 100644 >> --- a/lib/meson.build >> +++ b/lib/meson.build >> @@ -14,6 +14,7 @@ libraries = [ >> 'argparse', >> 'telemetry', # basic info querying >> 'eal', # everything depends on eal >> + 'ptr_compress', >> 'ring', >> 'rcu', # rcu depends on ring >> 'mempool', >> diff --git a/lib/ptr_compress/meson.build b/lib/ptr_compress/meson.build >> new file mode 100644 >> index 0000000000..e92706a45f >> --- /dev/null >> +++ b/lib/ptr_compress/meson.build >> @@ -0,0 +1,4 @@ >> +# SPDX-License-Identifier: BSD-3-Clause >> +# Copyright(c) 2024 Arm Limited >> + >> +headers = files('rte_ptr_compress.h') >> diff --git a/lib/ptr_compress/rte_ptr_compress.h b/lib/ptr_compress/rte_ptr_compress.h >> new file mode 100644 >> index 0000000000..bf9cfb0661 >> --- /dev/null >> +++ b/lib/ptr_compress/rte_ptr_compress.h >> @@ -0,0 +1,324 @@ >> +/* SPDX-License-Identifier: BSD-3-Clause >> + * Copyright(c) 2024 Arm Limited >> + */ >> + >> +#ifndef RTE_PTR_COMPRESS_H >> +#define RTE_PTR_COMPRESS_H >> + >> +/** >> + * @file >> + * Pointer compression and decompression functions. >> + * >> + * When passing arrays full of pointers between threads, memory containing >> + * the pointers is copied multiple times which is especially costly between >> + * cores. These functions allow us to compress the pointers. >> + * >> + * Compression takes advantage of the fact that pointers are usually located in >> + * a limited memory region. We compress them by converting them to offsets from >> + * a base memory address. Offsets can be stored in fewer bytes. >> + * >> + * The compression functions come in two varieties: 32-bit and 16-bit. >> + * >> + * To determine how many bits are needed to compress the pointer calculate > > Please add a , > ... to compress the pointer, calculate ... > >> + * the biggest offset possible (highest value pointer - base pointer) >> + * and shift the value right according to alignment (shift by exponent of the >> + * power of 2 of alignment: aligned by 4 - shift by 2, aligned by 8 - shift by >> + * 3, etc.). The resulting value must fit in either 32 or 16 bits. >> + * >> + * For usage example and further explanation please see "Pointer Compression" in >> + * doc/guides/prog_guide/ptr_compress_lib.rst > > I don't like refering to a path in the sources: the rendered doc won't > link to the actual documentation page, and this path may get incorrect > in the future if for some reason the doc is renamed or moved. > The simpler is to state "please see this library documentation > programming guide". > > >> + */ >> + >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> +#include > > It is unneeded. > Please, don't create a dependency to the mempool library. > > I have addressed all of the above in v15. >> +#include >> + >> +#ifdef __cplusplus >> +extern "C" { >> +#endif >> + >> +/** >> + * Calculate how many bits are required to store a value within a given range. >> + * This is to help decide which pointer compression functions can be used to >> + * store pointers contained within a memory range. >> + * >> + * @param range >> + * The size of the range the value belongs to. > > In my mind, a range takes the form of a set of two symbols. > > Here, iiuc, what is needed/requested as an input is the number of > entries of a (contiguous) space. > So the naming is at least strange. > >> + * @return >> + * Number of bits required to store a value. >> + **/ >> +#define RTE_PTR_COMPRESS_BITS_REQUIRED_TO_STORE_VALUE_IN_RANGE(range) \ >> + (((uint64_t)range) < 2 ? 1 : \ >> + (sizeof(uint64_t) * CHAR_BIT - rte_clz64((uint64_t)range - 1))) > > But now, I don't see why we need to expose this macro (and its sister > RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT) at all. > Can you clarify the usecase? > > >> + >> +/** >> + * Calculate how many bits in the address can be dropped without losing any >> + * information thanks to the alignment of the address. >> + * >> + * @param alignment >> + * Memory alignment. >> + * @return >> + * Size of shift allowed without dropping any information from the pointer. >> + **/ >> +#define RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT(alignment) \ >> + ((alignment) == 0 ? 0 : rte_ctz64((uint64_t)alignment)) >> + >> +/** >> + * Determine if rte_ptr_compress_16_shift can be used to compress pointers >> + * that contain addresses of memory objects whose memory is aligned by >> + * a given amount and contained in a given memory range. >> + * >> + * @param mem_range >> + * The size of the memory region that contains the objects pointed to. > > Again, can you rephrase and not use the term "range"? > Expected input here is a number of pointers / elements in a space. > > I hope I addressed all of the comments above about the use of range in macros in v15. I have renamed them to better reflect their use. The functions don't care about number of elements but instead about the memory ranges that the pointers are constrained to - hence the range in names originally. I agree that range name implies two values, I am now calling it a mem_length to make it unambiguous. The parameter is the length of the memory region. All the macros exposed are useful - they allow you to easily determine the params to use in the compression functions. >> + * @param obj_alignment >> + * The alignment of objects pointed to. >> + * @return >> + * 1 if function can be used, 0 otherwise. >> + **/ >> +#define RTE_PTR_COMPRESS_CAN_COMPRESS_16_SHIFT(mem_range, obj_alignment) \ >> + ((RTE_PTR_COMPRESS_BITS_REQUIRED_TO_STORE_VALUE_IN_RANGE(mem_range) - \ >> + RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT(obj_alignment)) <= 16 ? 1 : 0) >> + >> +/** >> + * Determine if rte_ptr_compress_32_shift can be used to compress pointers >> + * that contain addresses of memory objects whose memory is aligned by >> + * a given amount and contained in a given memory range. >> + * >> + * @param mem_range >> + * The size of the memory region that contains the objects pointed to. >> + * @param obj_alignment >> + * The alignment of objects pointed to. >> + * @return >> + * 1 if function can be used, 0 otherwise. >> + **/ >> +#define RTE_PTR_COMPRESS_CAN_COMPRESS_32_SHIFT(mem_range, obj_alignment) \ >> + ((RTE_PTR_COMPRESS_BITS_REQUIRED_TO_STORE_VALUE_IN_RANGE(mem_range) - \ >> + RTE_PTR_COMPRESS_BIT_SHIFT_FROM_ALIGNMENT(obj_alignment)) <= 32 ? 1 : 0) > > RTE_PTR_COMPRESS_CAN_COMPRESS_16_SHIFT and > RTE_PTR_COMPRESS_CAN_COMPRESS_32_SHIFT do the same job. > The only thing that differs is the size of the compressed space, so > maybe this size could be passed as an input. > > No strong opinion though. > > They are different and depending on your architecture you might not want to use 16-bit even if you can fit the pointers in 16 bits due to performance. I am keeping them separate. >> + >> +/** >> + * Compress pointers into 32-bit offsets from base pointer. >> + * >> + * @note It is programmer's responsibility to ensure the resulting offsets fit >> + * into 32 bits. Alignment of the structures pointed to by the pointers allows >> + * us to drop bits from the offsets. This is controlled by the bit_shift >> + * parameter. This means that if structures are aligned by 8 bytes they must be >> + * within 32GB of the base pointer. If there is no such alignment guarantee they >> + * must be within 4GB. >> + * >> + * @param ptr_base >> + * A pointer used to calculate offsets of pointers in src_table. >> + * @param src_table >> + * A pointer to an array of pointers. >> + * @param dest_table >> + * A pointer to an array of compressed pointers returned by this function. >> + * @param n >> + * The number of objects to compress, must be strictly positive. >> + * @param bit_shift >> + * Byte alignment of memory pointed to by the pointers allows for >> + * bits to be dropped from the offset and hence widen the memory region that >> + * can be covered. This controls how many bits are right shifted. >> + **/ >> +static __rte_always_inline void >> +rte_ptr_compress_32_shift(void *ptr_base, void * const *src_table, >> + uint32_t *dest_table, size_t n, uint8_t bit_shift) >> +{ >> + size_t i = 0; >> +#if defined RTE_HAS_SVE_ACLE && !defined RTE_ARCH_ARMv8_AARCH32 > > Note: DPDK usually split per architecture implementation in separate > header files, but I guess this is okay in the current form with #ifdef > for now.. > > [snip] > >