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 0373D43EF8; Wed, 24 Apr 2024 19:51:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D765435C0; Wed, 24 Apr 2024 19:51:09 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) by mails.dpdk.org (Postfix) with ESMTP id D7AEB435BE for ; Wed, 24 Apr 2024 19:51:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LlfRyqMEYS6cDd8PVsk97l/d7/GqTurN7l9sQZYKqgZ5HQ4ONh6C1L/Q19IFOlbq+xb5lZPdGVOHUBPSeAb3HcbOFf0appR8hvw/1K1aMPimYQTi47erg9ZQ+SuHMf9fYP42/T2nc5zFgep+LQzYTN+Zihs3pZEjP3N8Cx7PxEk72lh+81QGWMFDZ8AMFPXcmgo8LEhWk4RBiyZdXkhHwhwnI3kgnE/N2mAECGU488O0hdAKnwrUAaehwh/zy4wzfIXMPSXgJZMNj3CWf6OtxQ2rNVPl1l8Vbd/gWrRK3MR8jBaINZk04t4fkDlBtbf+acYS1Ebd55KMHBeRflUKlw== 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=+8oYpNI9ZCmSArCgzNfavu+EeHqu+NdQu0k9sLByunk=; b=LA1UuZVuoG3kS491czB6yHNhJAR+hX45UvsE+7Bn5RBwf5s/+dzuGz8fF8OERZdt9dOo+7YbWaHjRp6rgczv+92i6GtdIen3ULzTVrLKxFVE8wrokUu0qbUvbi+I9645QAJERuSg71w8qUM3LJqF29g0K1fIK9Y5tPxhwkaLlfZWtXtaIVRpYZmIHHnV3miVg5YdSNFfLR2x+HZuGOpF3F1VowAVqVuAb0hfz+K2WwzZEZBYY3MNn9ZQpBaTAXR9gQn9xUikUUsRPmr2YYHb36ogw+9RYlBli9IwqzFTYA+BDgNChTZj1vgZ7TE4Cw04gzWAoQAxRwugbBNX2AfJFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+8oYpNI9ZCmSArCgzNfavu+EeHqu+NdQu0k9sLByunk=; b=jHYGIz7TSx8mG3dHO+JC+bKPVxr69vVg/CMZzfbvkhKNRetmu9ZLSiGrO7vXqUEnYcjhTpQV7N3P5ET2Xyq7q0M4Rea5yeBg0YOIZkpk59LzJtM/qbF2OFddEVkEYp5bcwblDdUBKLUUGqZrUcGtCXL9yRrbYNqDTIkf6rIQFYA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH0PR12MB5647.namprd12.prod.outlook.com (2603:10b6:510:144::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Wed, 24 Apr 2024 17:50:54 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3%7]) with mapi id 15.20.7472.044; Wed, 24 Apr 2024 17:50:54 +0000 Message-ID: <0ff40e60-926b-44eb-8af5-2e16aff1c336@amd.com> Date: Wed, 24 Apr 2024 18:50:50 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] net/af_packet: cache align Rx/Tx structs To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , "John W . Linville" Cc: dev@dpdk.org, Tyler Retzlaff , Honnappa Nagarahalli References: <20240423090813.94110-1-mattias.ronnblom@ericsson.com> <6f7aabcb-2c12-4cfe-ae9d-73b42bfd4977@amd.com> <63dbb564-61f6-4d9f-9c13-4a21f5e97dc9@lysator.liu.se> <5d2a0887-527a-4948-943c-65f1dfda9328@amd.com> <3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.liu.se> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4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TIDQYp545+TPV7oyF0LfXcsQs SFVZE6igdvkjfYmh+QOrHGZvpWXLTmffVf/AQ81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.liu.se> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2PR04CA0319.eurprd04.prod.outlook.com (2603:10a6:10:2b5::24) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH0PR12MB5647:EE_ X-MS-Office365-Filtering-Correlation-Id: 8376bb34-b3ac-428e-9efa-08dc64871684 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?WWFYdXRrZVlKNzNCYXBqK0hNcFFISVphaHp3OFZxSlN4ay9qNXhycGxIOGxO?= =?utf-8?B?NGN4S2o2OVpQU3UxYUZWZktlN3hnbHZDMjRmeGJwS0dyZjhuMkJQN3pURGxS?= =?utf-8?B?ZVUxWlpaVUZUQ1RTM2p0K0FXaGVDM2ExcWVyWnZpazArODJMUWNMOElTbjlq?= =?utf-8?B?SkM1VTJFM1JWYmY3VXdVTGJ0aHJSQW9lNER3cVIweUNuVGVUbzNRdS9WdHRN?= =?utf-8?B?QnRkSzhKOGxJUytJN3d2OHlYWEZjRzArK0RFcnY2TXJTWVJrS1NaUlhSZjFN?= =?utf-8?B?L3g3ajNOano3bEFMb3RLZnJsMWx3cDRzVnA4TnBGOWJjL3ljNU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ThYRkJYR2Rnb2JrZnUvb3pKQ3M0dFQy?= =?utf-8?B?a09ucWZJQ3VqTVQrbFIrdGExdWhsQ1NITmxjSC81cnp3enRUWS9YSmJxZEhY?= =?utf-8?B?RzB4eVBySEMrWWRXWmp1SFFlbDVFNkFlNnVOUCswT2tIQ3FBTWxhdDdQQm5V?= =?utf-8?B?NURrTjVRMnBvQWV6L25PQnpnWnRzUllxa1NoME9MNTE2TmIyakVYQVQ5VEY5?= =?utf-8?B?VGp5VytOOFZtbDRmRU14VlBwWXlCNmJYcXQxR0RaQXVpZGdPTjN6UkM3Ky9R?= =?utf-8?B?NmtpRHloM1Y1cHNPMlBMZjRZbEZnTW1RdjVPTFBYc2JYY01kSDdxZGFDanZn?= =?utf-8?B?YklMRFNBM3UySGxrRVpNaVpPSlFCTzBqNkhGSTRmTVlsZzd3VFMyNTVoemd5?= =?utf-8?B?OHdzTWovdDdXbE9FL1VaN21oUFZmanRQb1NOYjlVdFBPVHYwYXJaZy9OeE1k?= =?utf-8?B?UGgxRkZZZndSWnBqbWdIb1JIbmcrZ0VlaDJ5MDFrcFJYb0hYbGJhREtBPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R3hmVXZDMDF2OFVjViszZXVhY0luazNObjZMUkJHekxFcEpSQmw3NXU4K2ht?= =?utf-8?B?azNCcUd6Smgvb2ZaWmE2bXRKeGNjWEhvSVh4d3FLa3NndUc0Q2Z6NTdiUGM3?= =?utf-8?B?R3I2NGUvYnB1ZlZ1WHZtTlpkV0EvdllwNnpJMHhZcWR2VkJZUUN4ekFjSHVk?= =?utf-8?B?b0I2NWZWSmo2V0U0ZjN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UXlLWVVLTUlt?= =?utf-8?B?blh2b3p0K1VvOEdGR1ZObVoyZFBMbjFna0h6dWx0MTUzUWlteHcxZHNKRGFH?= =?utf-8?B?U2s3VHlrK1lzcTRVZDNzeVdacXFTVlRweUloVFZ5MHVBUWJGcW5nNTRrY0pB?= =?utf-8?Q?JmQadxk3p5/HZ/X1ekRN1dHep?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8376bb34-b3ac-428e-9efa-08dc64871684 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 17:50:54.3409 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qIRubLc5gdZiVcg18Hp4fHJ6KWWkJDKLycVLeJTmND7tcF70LI2gcVH1fjPp5NcL X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5647 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 4/24/2024 12:57 PM, Mattias Rönnblom wrote: > On 2024-04-24 12:21, Ferruh Yigit wrote: >> On 4/23/2024 9:56 PM, Mattias Rönnblom wrote: >>> On 2024-04-23 13:15, Ferruh Yigit wrote: >>>> On 4/23/2024 10:08 AM, Mattias Rönnblom wrote: >>>>> Cache align Rx and Tx queue struct to avoid false sharing. >>>>> >>>>> RX struct happens to be 64 bytes on x86_64 already, so cache alignment >>>>> makes no change there, but it does on 32-bit ISAs. >>>>> >>>>> TX struct is 56 bytes on x86_64. >>>>> >>>> >>>> Hi Mattias, >>>> >>>> No objection to the patch. Is the improvement theoretical or do you >>>> measure any improvement practically, if so how much is the improvement? >>>> >>> >>> I didn't run any benchmarks. >>> >>> Two cores storing to a (falsely) shared cache line on a per-packet basis >>> is going to be very expensive, at least for "light touch" applications. >>> >> >> ack >> I expect for af_packet bottleneck is the kernel side, so I don't expect >> any visible improvement practically, but OK to fix this theoretical >> issue. >> > > If you use af_packet as a slow path interface, you may well poll it > often. If you are unlucky and aren't on an ISA where the RX struct *by > accident* is cache-line aligned, you will suffer greatly from false > sharing, because the counters are written to regardless if there are > packets polled or not. > > If you don't care about synchronization overhead, why even support > multi-queue in the af_packet driver!? > We care, only I expect no measurable performance improvement and was asking if you have data for it. >>>>> Both structs keep counters, and in the RX case they are updated even >>>>> for empty polls. >>>>> >>>> >>>> Do you think does it help if move 'rx_pkts' & 'rx_bytes' update within >>>> the loop? >>>> >>> >>> No, why? Wouldn't that be worse? Especially since rx_pkts and rx_bytes >>> are declared volatile, so you are forcing a load-modify-store cycle for >>> every increment. >>> >> >> My intention was to prevent updating stats in empty polls, I thought >> stats will be hot in the cache but won't work with volatile. >> >> >>> I would drop "volatile", or replace it with an atomic (although *not* >>> use an atomic add for incrementing, but rather atomic load + >>> non-atomic adds + atomic store). >>> >> >> As only single core polls from an Rx queue, I assume atomics is required >> only for stats reset case. And for that case won't we need atomic add? >> > > Correct me if I'm wrong here, but my impression is that statistics reset > tend to be best-effort in DPDK. Or, expressed in a different way, are > not thread-safe. > At least I don't see this is something documented. For cases HW tracks stats we don't have this problem. Or some drivers use offset mechanism you mentioned below. But I can see some soft drivers will have this problem with stats clear. > If you want to support MT safe counter reset, the counter increment > operation must be an atomic add, since now you have two writers. (Unless > you do something fancy and keep only a new offset upon reset, and never > actually zero the counter.) > Asking to learn, if we ignore the stats reset case and assume stats only incremented, single writer case, do we still need either volatile qualifier or atomic operations at all? >> And do you know if there is a performance difference between atomic add >> and keeping volatile qualifier? >> >> > > I don't know how slow af_packet is, but if you care about performance, > you don't want to use atomic add for statistics. > There are a few soft drivers already using atomics adds for updating stats. If we document expectations from 'rte_eth_stats_reset()', we can update those usages. > volatile in this case it's not a big issue, performance-wise, I would > expect. > >>>>> Signed-off-by: Mattias Rönnblom >>>>> --- >>>>>    drivers/net/af_packet/rte_eth_af_packet.c | 5 +++-- >>>>>    1 file changed, 3 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/drivers/net/af_packet/rte_eth_af_packet.c >>>>> b/drivers/net/af_packet/rte_eth_af_packet.c >>>>> index 397a32db58..28aeb7d08e 100644 >>>>> --- a/drivers/net/af_packet/rte_eth_af_packet.c >>>>> +++ b/drivers/net/af_packet/rte_eth_af_packet.c >>>>> @@ -6,6 +6,7 @@ >>>>>     * All rights reserved. >>>>>     */ >>>>>    +#include >>>>>    #include >>>>>    #include >>>>>    #include >>>>> @@ -53,7 +54,7 @@ struct pkt_rx_queue { >>>>>          volatile unsigned long rx_pkts; >>>>>        volatile unsigned long rx_bytes; >>>>> -}; >>>>> +} __rte_cache_aligned; >>>>>    >>>> >>>> Latest location for '__rte_cache_aligned' tag is at the beginning of >>>> the >>>> struct [1], so something like: >>>> `struct __rte_cache_aligned pkt_rx_queue {` >>>> >>>> [1] >>>> https://patchwork.dpdk.org/project/dpdk/list/?series=31746&state=%2A&archive=both >>