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 4675443B6F; Thu, 22 Feb 2024 09:15:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18519402DA; Thu, 22 Feb 2024 09:15:59 +0100 (CET) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2055.outbound.protection.outlook.com [40.107.8.55]) by mails.dpdk.org (Postfix) with ESMTP id 0876140281 for ; Thu, 22 Feb 2024 09:15:58 +0100 (CET) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=MavDrj0ug+9xpVqIUU+c/+4Bhx9uWBuNvr7ycpKwfkj6altur9VTa8ZiysaM7yjR12UKiMcJpTrWI44Ypi9e9rgSqjyKLvLDEig33/HJKm7psYqlsM0yQHVVRtORsRGTHEdt5Q69d9WjXGfN+7uQWhse3XxDtX7J7KnPxhr6FNPEW9b/5FBkuW3rLXeTq3RuloBZSVv4/gqSfDa6GkUFV7FaGWK08nyNuZrRizibmqtSkGRtwk4x5DNAvQrcnCec7dDBGd9TodXA552WxIFDhyFbxe64smY6N02QtGT5s4zHmmSaLOGnxzBCiw0FM6bjGEdQWMqPcWM498AFXzozVA== 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=fV5swshUByxdQkrLvi70QMzaRDkZUYmnstd+YJ+DVLU=; b=iUQJAkPh41rERzwVQyZMpr9WNzS5CZNf0KV8xypuHZyOvZ1sIuwXHihL6Vi45gGWUwHllvEDVYPj1/ovUmc2Q7k4d/OihTU7JhY0MbcxG02s7ziLoxvoUuO+5S4dOzMxgqY8TXuPsBgahWn405BKZsTIQ1GMmvep3sRX8Q1dLKn9AmIYiXAf/qf7Nf7T4ZTe80c0a3LSaCMQC/HIrOvZqv6I7QJnkYr2ZwE60xS66TAJxkmwOV1RHPHzpcnYCT1wrE1EIBCZnI3XZxFyRJGWblKiQrl729egTbLyy/R9g1A0oTt5e9bRaDkIxrWfoUPJa6cTotOBrI2JDOG4UIIuEQ== 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=armh.onmicrosoft.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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fV5swshUByxdQkrLvi70QMzaRDkZUYmnstd+YJ+DVLU=; b=a52F3huTR/anbofAbMLFonY6R2yIRAoj2326TQ1WqskreAqL4JYH5OGF6p9JIyBM8shBGNFG0+zCWfxP8DVLhUdU+tLL0ZTJ55tMhMNtY3E3LsHmUxazlAWzTMpj9B7bh5TJYS+ZAhf/FcF5XNBd8WktdGbpgLIYltuwQpUsSDk= Received: from AM7PR03CA0002.eurprd03.prod.outlook.com (2603:10a6:20b:130::12) by DB9PR08MB9539.eurprd08.prod.outlook.com (2603:10a6:10:453::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39; Thu, 22 Feb 2024 08:15:55 +0000 Received: from AMS0EPF000001A9.eurprd05.prod.outlook.com (2603:10a6:20b:130:cafe::f9) by AM7PR03CA0002.outlook.office365.com (2603:10a6:20b:130::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.43 via Frontend Transport; Thu, 22 Feb 2024 08:15:55 +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=armh.onmicrosoft.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 AMS0EPF000001A9.mail.protection.outlook.com (10.167.16.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Thu, 22 Feb 2024 08:15:55 +0000 Received: ("Tessian outbound c926391f1b75:v228"); Thu, 22 Feb 2024 08:15:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 550a4cac3a48fd66 X-CR-MTA-TID: 64aa7808 Received: from 651651ba387f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AC39C60D-5047-4619-A650-721E63DE05F6.1; Thu, 22 Feb 2024 08:15:48 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 651651ba387f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 22 Feb 2024 08:15:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BMl3ps9TEw4ll/ieSkxhuzfGOdU6T89LU8lXwjogrirLmqNFwj60UUfZAx0/dkeoWSMGy7qMEf/r1cSYpi20rWeNO0A1FEVcPMWlbOD4ZgENPrYXLcTSwc9bKJ9wblflt/MkoOcfy0gfbhO6HqVkXMgguAExX45V6sHj+ElvYfR9QdTGv09VT4EBkYOe6NW8CzxiDxOiahbR3qGWGpvAf1b7RRMdWBgQ+x2wb7PMyMkvyew4LJ3mo6HuzGhwC156pzKfBqrobJzE0d5MDICAWAnSYL6dcNSC/umi7wD63H9wgGVBsIo0CcFXAKHpbYD3ecx+JhEYKS2iWAd+oRgKQQ== 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=fV5swshUByxdQkrLvi70QMzaRDkZUYmnstd+YJ+DVLU=; b=mqIDjplugaiaK5edmKPj1JEon5q80C+o1UfvTUP7jPyTwOVim/Fi3VkyDL1RnS7QxyXFC26k8HFIaVuEWOK8FUL1tUR99DFtcfgjKSvXWhN6s1b3vO/+IbNZkLQNU3PnOccwISdmjVAixCjUZ2cFWdTwgBNWbMKvR7RY+Ti9ar5N/73e7IPdMeIUsHFqcNmi1RV6R+xXGbC9zy2fd5mm3kAMEpC2j/43c3rQus3+Te+zixZ1HiwYDYoMeNG1NCLpb3eytB6T6M9J3CmT2eI13QIUUdoYkNTPZOa4KY8bVBvmYvHUGALkQSLiKRhYOgG2W7AaEC/CWMHe3NIBULVvUA== 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=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fV5swshUByxdQkrLvi70QMzaRDkZUYmnstd+YJ+DVLU=; b=a52F3huTR/anbofAbMLFonY6R2yIRAoj2326TQ1WqskreAqL4JYH5OGF6p9JIyBM8shBGNFG0+zCWfxP8DVLhUdU+tLL0ZTJ55tMhMNtY3E3LsHmUxazlAWzTMpj9B7bh5TJYS+ZAhf/FcF5XNBd8WktdGbpgLIYltuwQpUsSDk= 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 DB9PR08MB8698.eurprd08.prod.outlook.com (2603:10a6:10:3d2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.23; Thu, 22 Feb 2024 08:15:42 +0000 Received: from DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::a021:80c7:5fca:634]) by DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::a021:80c7:5fca:634%6]) with mapi id 15.20.7316.023; Thu, 22 Feb 2024 08:15:42 +0000 Message-ID: <7058331a-d829-4f0e-8634-726ca3be1ef2@arm.com> Date: Thu, 22 Feb 2024 08:15:38 +0000 User-Agent: Mozilla Thunderbird Cc: nd@arm.com Subject: Re: [PATCH v5 0/4] add pointer compression API Content-Language: en-US To: dev@dpdk.org, konstantin.v.ananyev@yandex.ru References: <20230927150854.3670391-2-paul.szczepanek@arm.com> <20231101181301.2449804-1-paul.szczepanek@arm.com> From: Paul Szczepanek In-Reply-To: <20231101181301.2449804-1-paul.szczepanek@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO6P123CA0017.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:313::7) To DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB4PR08MB8151:EE_|DB9PR08MB8698:EE_|AMS0EPF000001A9:EE_|DB9PR08MB9539:EE_ X-MS-Office365-Filtering-Correlation-Id: a701ca4d-ee03-4d86-328e-08dc337e7e25 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Hl1HmWE55tsdzdxCrgT4T56exYXmZnw5HQez8QEA/LMTvNK1sSieVMlCWmTqQpwlhPw8knh8DpRp9BS6ccIyr0qrGfHIFN8brtLdL27pqw0vTXC7EGcIW4UMpv8yppUU3tYlbRpUiS47/Gp4FtEBvERRuWAfxQWDO2e6aqpk5b33r2/hj1jalh/bFTFzxLCuEvyZ+XXcfaTqIoIAFHxZErIEmAr4rlyPj+ETArkVyVVF8DU987/4RsGoo/GG5Koi+nV9jjF2Kc4BqBcLdRh7+Wix1yJJRRaSV3rVhxVKTo50cL5YAcIF2criZdul3EwgqcG7TSe0DWZAiUgOSJVTKMNeyEuPo425nBjgX9UQFV1BAiedGaa8JXZ0Zz+q/ixrSrk0oJVkDd1pGHxF7ITKv5HkLrS7FBF9OU83gF2LxCtjpITZTmLmP5L44pwg8LRi80sNvW4b4rk0CdyGa5Uubc9NkC0vyIDam1/ac/oWIC5R/IORpyxgK01jTHAatnJNnMo7046X6edDpBzWXAJFj6GNl3TBndaqIA7quM6uwxjGv92KbeLmVHSoB3b8feaq 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)(230273577357003); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB8698 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: AMS0EPF000001A9.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 7a8c2833-309a-49f8-95e5-08dc337e7614 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F61Sgqd+fojWGS3FQo2RWElb4HBVtBlnGdxPYb4rQg5G0n0hYc7jkyOVzrx0i/ZIb+QUZkalf0qEG422lzCx9zwDp19XrQPdgnNJVMD68Lh3Q2wckFtxPUyo4k1KPfNd6Eu089EBLSCxg4UyoZy8kiT3fRs2helJaPzwzX+ywFJ/1f2oZksam37QUL7oTY87CY/dPwM09QmieJ+evxHd5KPYVebYrFVGrNVmXtCMi9ucBI/cKKHPOhLFMrBWPVxek/Jho+zqU13wT2BUNEKjswfxbYeowMiX8lWtbASydr2Q8CsUBxmba1RB/d1+UyCCqhLkdhD+RKQWD788zWc8OW6tRPvCp2GZbSrsntdWJmj/BujEgXNAzetVL0IkrgQ60Y9LNXzh/bW9smu/n45p3fDEOnb5jVmacGutgDzithk3Bw/AUDkPO8Iq4wNuunI3g0zdPpaeZqSH9LAhn17+XSIqDjKsPq7mtI7bWFtUSGKnTe4qG8ARkQ8WyMphqW0xb8FqUNt3ZdhdVgwTOfNvI7wheWyKyaUp8OnBPc/v/qpqBdQjgbfsBghzlzf6f9lbnJ6i4qakED6pzwyQX9633leXRlGoEVfdcOi8797sbCSVT/zWc8HqpHlSpSeAE+kkSy+bOm0lsR4Sq+6jMsUhjCCiB1eJ7OLtEQxkbwoUvww= 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)(230273577357003)(36860700004)(40470700004)(46966006); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2024 08:15:55.4561 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a701ca4d-ee03-4d86-328e-08dc337e7e25 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: AMS0EPF000001A9.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9539 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 For some reason your email is not visible to me, even though it's in the archive. On 02/11/202416:32,Konstantin Ananyev konstantin.v.ananyev wrote: > From one side the code itself is very small and straightforward, > from other side - it is not clear to me what is intended usage for it > within DPDK and it's applianances? > Konstantin The intended usage is explained in the cover email (see below) and demonstrated in the test supplied in the following patch - when sending arrays of pointers between cores as it happens in a forwarding example. On 01/11/2023 18:12, Paul Szczepanek wrote: > This patchset is proposing adding a new EAL header with utility functions > that allow compression of arrays of pointers. > > When passing caches full of pointers between threads, memory containing > the pointers is copied multiple times which is especially costly between > cores. A compression method will allow us to shrink the memory size > copied. > > 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. The API is > very generic and does not assume mempool pointers, any pointer can be > passed in. > > Compression is based on few and fast operations and especially with vector > instructions leveraged creates minimal overhead. > > The API accepts and returns arrays because the overhead means it only is > worth it when done in bulk. > > Test is added that shows potential performance gain from compression. In > this test an array of pointers is passed through a ring between two cores. > It shows the gain which is dependent on the bulk operation size. In this > synthetic test run on ampere altra a substantial (up to 25%) performance > gain is seen if done in bulk size larger than 32. At 32 it breaks even and > lower sizes create a small (less than 5%) slowdown due to overhead. > > In a more realistic mock application running the l3 forwarding dpdk > example that works in pipeline mode on two cores this translated into a > ~5% throughput increase on an ampere altra. > > v2: > * addressed review comments (style, explanations and typos) > * lowered bulk iterations closer to original numbers to keep runtime short > * fixed pointer size warning on 32-bit arch > v3: > * added 16-bit versions of compression functions and tests > * added documentation of these new utility functions in the EAL guide > v4: > * added unit test > * fix bug in NEON implementation of 32-bit decompress > v5: > * disable NEON and SVE implementation on AARCH32 due to wrong pointer size > > Paul Szczepanek (4): > eal: add pointer compression functions > test: add pointer compress tests to ring perf test > docs: add pointer compression to the EAL guide > test: add unit test for ptr compression > > .mailmap | 1 + > app/test/meson.build | 1 + > app/test/test_eal_ptr_compress.c | 108 ++++++ > app/test/test_ring.h | 94 ++++- > app/test/test_ring_perf.c | 354 ++++++++++++------ > .../prog_guide/env_abstraction_layer.rst | 142 +++++++ > lib/eal/include/meson.build | 1 + > lib/eal/include/rte_ptr_compress.h | 266 +++++++++++++ > 8 files changed, 843 insertions(+), 124 deletions(-) > create mode 100644 app/test/test_eal_ptr_compress.c > create mode 100644 lib/eal/include/rte_ptr_compress.h > > -- > 2.25.1 >