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 7F4EF43FD1; Wed, 8 May 2024 21:48:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C06D40270; Wed, 8 May 2024 21:48:17 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2089.outbound.protection.outlook.com [40.107.94.89]) by mails.dpdk.org (Postfix) with ESMTP id 1EE6D4026E for ; Wed, 8 May 2024 21:48:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oFByDYeCxbuKNiPLmA6h8OFGTWesNSuQq2RwUxKEiktS4qMbXoM3rL4snXr3ZDKZ+VnPkboemhOuCzn6I2nGyJmhF1ondQtCITG8+UbjNKd+Wu94dyBxePCFJU//ZtA4kjsbHTJVa+hkE51OMrlQinylho0x0tXrmvSPagKrIUeNz1NW3Dpa9ei2AOBHAU2SldxYThoIWqBYRzelFNoKV0SjfQR1uz4zm3e9P4P+wFsPk9nf0jsVK3/dqJIlAZJ2PcdXDWOb4dGROXqeBdHwmO+LGe59r0zQrtlI0dShn26wka3TbP8UH8iMe+w1IoI7FEj3R1ZGdwN5xbUyEsP+bw== 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=yiqmI3XvOMhxLJg1TPplo+jRRgQvFGamyvUNcw1U6CI=; b=bsv9edvrpcGaq/30rzDoHwghjG/+ejAB4Y7B1p50GlFKZuv8M9SlAFQUYSij5oOkFR3Jm/2g0+41RRdJMiEtpNQNzXztj68RhzYM29VTVwpkZA8tmt8eL3VD8vpvRACLMWbSRtacXs7o87ucqtVDtzMNoMrlI2o2Vy/sb1/OyBFHLZbsj/AGMMfxsYup88Cj0Mgxe8cL2IGTJdsPdQDd1T14k3xgWz3Kvx69KPHFOd5lWc8hKbIj2ItTDkAGttfbELVRH/JLmwQPBx36UGuHO+l1b0z2FO274FgJBFyFrizTshTk6rH5iGkxQGJZNMjkDn8BaNvgLy/aBZu9TQWxvw== 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=yiqmI3XvOMhxLJg1TPplo+jRRgQvFGamyvUNcw1U6CI=; b=2h9qprfIViJz6iFlh5HFLBjlOwitsB7nTzK6vxE4osarmiKVdN2yqCLuvMpPJqtHvSrIZx9yip+sHxsuKoDavK4RanSRp04co/pZ/hik769H00cPYsliiPtF88C4MiWXpGJRba6DooGn7bklnWsh8+MNYGpMr4qtXnS5z3R23yA= 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 SJ0PR12MB6685.namprd12.prod.outlook.com (2603:10b6:a03:478::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.45; Wed, 8 May 2024 19:48:10 +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.7544.041; Wed, 8 May 2024 19:48:10 +0000 Message-ID: <834102e5-8f4b-4b67-9f62-8e8f61403b39@amd.com> Date: Wed, 8 May 2024 20:48:06 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [RFC v3] net/af_packet: make stats reset reliable To: Stephen Hemminger , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: "John W. Linville" , Thomas Monjalon , dev@dpdk.org, =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , =?UTF-8?Q?Morten_Br=C3=B8rup?= References: <20240425174617.2126159-1-ferruh.yigit@amd.com> <20240503154547.392069-1-ferruh.yigit@amd.com> <20240503150011.55681b97@hermes.local> <432fb280-96e3-4079-b987-990d509b8c79@lysator.liu.se> <20240508082339.6bf74202@hermes.local> 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+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64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81wspzbfxJ7sYM4P8Mg5kKOsaoUdyA/2qVe cMh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240508082339.6bf74202@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DUZPR01CA0082.eurprd01.prod.exchangelabs.com (2603:10a6:10:46a::10) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB6685:EE_ X-MS-Office365-Filtering-Correlation-Id: 7da27fdf-4ba8-4592-b8b0-08dc6f97ca40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?emc4VGlDSTVxZGZxdi83TGY0c3RZZDY3ZmpoV0JlZFhaTlRPV0xreE9pR2FS?= =?utf-8?B?eElSUG11N2t5TStyMXhUMTJLRWFGbmN0WVFiYkR5L1o4Qy9Da0lObDlFT2ZD?= =?utf-8?B?c1VxWUhRSEE4dklPZ2Z5TzZ4SkNkUzJLS3lhWTNPMlZIQ0xtaHM2VUxMNFVW?= =?utf-8?B?VGNxRWJYRVpTbS9uK0VIOG0rMXlRQ3pLOTBNWW5pUk0xMnZoSG9iV3hiUGpy?= =?utf-8?B?VjVVZk1JMWJKb1B6SkJVUW4zQjZCdkR2OE4waHl5R0tYMU90bWZQUU1PN1RI?= =?utf-8?B?NVRONFk0NW5ub05NY2RVSW4rZDV4c2pMRTJ5Sko1dHFWaVpQQVNxaHp0S2dC?= =?utf-8?B?L0tvekMyQjFlalVjMXJqdDZES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SzVsdnZLeTRTeU9WT3plVGY2cC8rSFNPWlNUbk9oQ1RO?= =?utf-8?B?N0tRMnd4YnhxSjc4bHU2eFlpMzRFaWM5cEc5M0tqTzgrY1lMRmswT05iZlY0?= =?utf-8?B?NkQvd2RNVUNkeWxoL05seVZ3OTU3ZmdLNHNOdnpNaUY2UnRxQ2FZMTFvdEx1?= =?utf-8?B?VFhOczJTZ3NCcTNOYWNJdkhXVVFhOXZKdlpzQ3BkSjF4ckFwZXJYQVJZSVRu?= =?utf-8?B?VXBad255OUNmL0tmaFlpSW1sUDBpcGNQakhSWjFPcHQ0c2lSSk9HVjg0bUJs?= =?utf-8?B?dUo1WHBTM2FaaHFiajdSV0NmWFZPUk1ybFVCVDdpQm9tcWd2ZnkyY21YeWR1?= =?utf-8?Q?+LZ/WgEVv0k7Ess9Gceci4xEL0E41tZzmH0SrFuZlmII=3D?= 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?V0RvVDd5cmhFd3J2Qm1TcDVkZTVPWlNJUjhUd0hOUGw1eTlWeDVjZGZjUmpi?= =?utf-8?B?UmNUUmRnWVBKSmM1WG9aNlppbVNTUVNFQkNlUzVYYUlYMmhvRWRrSlJrQUp0?= =?utf-8?B?ZFlqY2I4YmZxWFF3ZXVWL3lKR3A1dTV0U3ZDZXdOR1p1eWZsSkxadjNkb3ly?= =?utf-8?B?Vmt1TGMxck90R3VOaHFwUDVRb2lJWXNFalBIb29MdjBTUjNLK2x2T3YrcTMz?= =?utf-8?B?a2lRa0EzaUhVN1dxSFdKZ2NmL0VkZE5DOHFseUdpTVUwaThZRXRWSW96UU5v?= =?utf-8?B?RDIydUxLa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dDRTbk1JaXZWeUlXMjczZ0VG?= =?utf-8?Q?DRi6/JhzoWfMur5zQM+4Gpkcc?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7da27fdf-4ba8-4592-b8b0-08dc6f97ca40 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2024 19:48:10.6031 (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: v/aTUljzrOvcAH4KaSd7L4aRDogWEsBHwKgeiscTxx+jkGLXq3Hr4cxOW0raTKTH X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6685 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 5/8/2024 4:23 PM, Stephen Hemminger wrote: > On Wed, 8 May 2024 09:19:02 +0200 > Mattias Rönnblom wrote: > >> On 2024-05-04 00:00, Stephen Hemminger wrote: >>> On Fri, 3 May 2024 16:45:47 +0100 >>> Ferruh Yigit wrote: >>> >>>> For stats reset, use an offset instead of zeroing out actual stats values, >>>> get_stats() displays diff between stats and offset. >>>> This way stats only updated in datapath and offset only updated in stats >>>> reset function. This makes stats reset function more reliable. >>>> >>>> As stats only written by single thread, we can remove 'volatile' qualifier >>>> which should improve the performance in datapath. >>>> >>>> While updating around, 'igb_stats' parameter renamed as 'stats'. >>>> >>>> Signed-off-by: Ferruh Yigit >>>> --- >>>> Cc: Mattias Rönnblom >>>> Cc: Stephen Hemminger >>>> Cc: Morten Brørup >>>> >>>> This update triggered by mail list discussion [1]. >>>> >>>> [1] >>>> https://inbox.dpdk.org/dev/3b2cf48e-2293-4226-b6cd-5f4dd3969f99@lysator.liu.se/ >>> >>> >>> NAK >>> >>> I did not hear a good argument why atomic or volatile was necessary in the first place. >>> Why? >>> >> >> On the reader side, loads should be atomic. >> On the writer side, stores should be atomic. >> >> Updates (stores) should actually occur in a timely manner. The complete >> read-modify-write cycle need not be atomic, since we only have a single >> writer. All this for the per-lcore counter case. >> >> If load or store tearing occurs, the counter values may occasionally >> take totally bogus values. I think that should be avoided. Especially >> since it will likely come at a very reasonable cost. >> >> From what it seems to me, load or store tearing may well occur. GCC may >> generate two 32-bit stores for a program-level 64-bit store on 32-bit >> x86. If you have constant and immediate-data store instructions, >> constant writes may also be end up teared. The kernel documentation has >> some example of this. Add LTO, it's not necessarily going to be all that >> clear what is storing-a-constant and what is not. >> >> Maybe you care a little less if statistics are occasionally broken, or >> some transient, inconsistent state, but generally they should work, and >> they should never have some totally bogus values. So, statistics aren't >> snow flakes, mostly just business as usual. >> >> We can't both have a culture that promotes C11-style parallel >> programming, or, at the extreme, push the C11 APIs as-is, and the say >> "and btw you don't have to care about the standard when it comes to >> statistics". >> >> We could adopt the Linux kernel's rules, programming model, and APIs >> (ignoring legal issues). That would be very old school, maybe somewhat >> over-engineered for our purpose, include a fair amount of inline >> assembler, and also and may well depend on GCC or GCC-like compilers, >> just like what I believe the kernel does. >> >> We could use something in-between, heavily inspired by C11 but still >> with an opportunity to work around compiler issues, library issues, and >> extend the API for our use case. >> >> I agree we shouldn't have to mark statistics _Atomic, or RTE_ATOMIC(), >> rte_atomic64_t, or rte_sometimes_atomic_and_sometimes_not64_t. Just >> keeping the usual C integer types seems like a better option to me. >> >>> Why is this driver special (a snowflake) compared to all the other drivers doing software >>> statistics (tap, virtio, xdp, ring, memif, netvsc, vmware)? >> >> If a broken piece of code has been copied around, one place is going to >> be the first to be fixed. > > > I dislike when any driver does something completely different than valid precedent. > No other driver in DPDK, Vpp, FreeBSD, Linux (and probably Windows) uses atomic for > updating statistics. We even got performance benefit at MS from removing atomic > increment of staistics in internal layers. > > The idea of load tearing is crazy talk of integral types. It would break so many things. > It is the kind of stupid compiler thing that would send Linus on a rant and get > the GCC compiler writers in trouble. > > The DPDK has always favored performance over strict safety guard rails everywhere. > Switching to making every statistic an atomic operation is not in the spirit of > what is required. There is no strict guarantee necessary here. > I kind of agree with Stephen. Thanks Mattias, Morten & Stephen, it was informative discussion. But for *SW drivers* stats update and reset is not core functionality and I think we can be OK to get hit on corner cases, instead of over-engineering or making code more complex. I am for putting priority as following (from high to low): - Datapath performance - Stats get accuracy - Stats reset accuracy With the restriction that stat reset requires forwarding to stop, we can even drop 'offset' logic. And I am not sure if it is a real requirement that stats reset should be supported during forwarding, although I can see it is convenient. If we get this requirement in the future, we can focus on a solution. As action, I am planning to send a new version of this RFC that only removes the 'volatile' qualifier. In next step we can remove atomic updates and volatile stat counters from more SW drivers. Thanks, ferruh