Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp1135186rwo; Sat, 22 Jul 2023 07:13:03 -0700 (PDT) X-Google-Smtp-Source: APBJJlGFa1W84I/xjCLC3L6e17KkB0bJmUoMDE3H34XmBRK2Ciwth+9M9bL7uEMSJRuH59VwMluw X-Received: by 2002:a05:6a00:a89:b0:66a:4a45:e017 with SMTP id b9-20020a056a000a8900b0066a4a45e017mr3323561pfl.20.1690035182672; Sat, 22 Jul 2023 07:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690035182; cv=none; d=google.com; s=arc-20160816; b=Xx6HbwwyB0BvYk4z4msN81kmQYyiG6vI7ViVUfYmUbrUE3enGt3T96df0uyqBpxA44 nOobQxH9dL3xvAgGRD3o2dff92kHG3ENEWQurIj1sW4BuekXxh+9zRP/Yg+iNy0QHJVv ckBeaKUKWI5W1rAUjmpQnVeGEPGPj1lYI/jIwJ4H/nfISHGPp1GSYBSl2v0ee3nfTAVV iuVS4I+A+YcAZtfQWCVykWwMD5SDgp18y+CpMt7WALUf2PxHHHlxD7AubohoAHiauPot LpfX+wBRFVeUBP5q58aVgCIMe4U+BwlGRHHMQvKIpBQ0iwiKyXkTL89pWkWQ3F5WQKHC Dekw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=alV8KTQqO7slHFAokgZR+g/rjJfsoQajc8LK2pHLBxc=; fh=ch8k4V67JfH70LcuAI951AexJ4SDGZByGyCnpwtaZiI=; b=yKB5cSX3rZBxzuw8DlV4nSOLtRujkGUpew1LtiMkxBzZND9SVBFMPrLIdlze34EK3k inqm3DFPPrAQ3+Gvm5/5haeoAweXxog/e+0fXRGpjLH6w0lkKIR+NieGZuC/TjtcrWj8 IiSH5Lxq+2RoRMqhcBuXpLSXv0jQDzqL3LyJQ4yoaO7zSbpEL/MmIBg1EP1ZwPJQACvU ye6CeZdnxnIVK6UelnO+J/9h4ZXhM7TyU9GBdcwbYnVL/tA5/EYL9QbiNJUWuuR8SqVQ SFywVOKvg2xJCsZtNlxl8KS5jSo02uDmJq0G7YqYrtJsCFUfWXxXa02z6dWz57lErpQg XlYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu6-20020a056a00410600b0067ff1a1ccbcsi5241381pfb.63.2023.07.22.07.12.35; Sat, 22 Jul 2023 07:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbjGVOG4 (ORCPT + 99 others); Sat, 22 Jul 2023 10:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGVOGy (ORCPT ); Sat, 22 Jul 2023 10:06:54 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F8132D77 for ; Sat, 22 Jul 2023 07:06:51 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-122-J7OFbQsWNqyfCrR826JB4A-1; Sat, 22 Jul 2023 15:06:48 +0100 X-MC-Unique: J7OFbQsWNqyfCrR826JB4A-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 22 Jul 2023 15:06:47 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 22 Jul 2023 15:06:47 +0100 From: David Laight To: 'Alan Huang' , Joel Fernandes , "Paul E. McKenney" , "Eric Dumazet" , "roman.gushchin@linux.dev" CC: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "rcu@vger.kernel.org" Subject: RE: Question about the barrier() in hlist_nulls_for_each_entry_rcu() Thread-Topic: Question about the barrier() in hlist_nulls_for_each_entry_rcu() Thread-Index: AQHZvKDlW9UBwZmf30GL9p6MGC4yBq/F0Gvg Date: Sat, 22 Jul 2023 14:06:47 +0000 Message-ID: <8e1885b62d124cca9198ff6cdb52c7f5@AcuMS.aculab.com> References: <1E0741E0-2BD9-4FA3-BA41-4E83315A10A8@joelfernandes.org> <1AF98387-B78C-4556-BE2E-E8F88ADACF8A@gmail.com> <76552616-5DF1-4A05-BA5A-AE0677F861FC@gmail.com> In-Reply-To: <76552616-5DF1-4A05-BA5A-AE0677F861FC@gmail.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Li4uLg0KPiA+IEZvdW5kIGEgcmVsYXRlZCBkaXNjdXNzaW9uOg0KPiA+DQo+ID4gaHR0cHM6Ly9n Y2MuZ251Lm9yZy9idWd6aWxsYS9zaG93X2J1Zy5jZ2k/aWQ9MTAyNzE0DQo+ID4NCj4gPiBMb29r cyBsaWtlIEdDQyAxMCwgMTEgaGF2ZSBiZWVuIGJhY2twb3J0ZWQsIG5vdCBzdXJlIHdoZXRoZXIg R0NDIDggaGFzIGJlZW4gYmFja3BvcnRlZC4NCj4gPg0KPiA+IFNvLCBJIGhhdmUgdGhlIGZvbGxv d2luZyBxdWVzdGlvbnM6DQo+ID4NCj4gPiBHaXZlbiB0aGF0IHNvbWUgcGVvcGxlIG1pZ2h0IG5v dCB1cGRhdGUgdGhlaXIgR0NDLCBkbyB0aGV5IG5lZWQgdG8gYmUgbm90aWZpZWQ/DQo+ID4NCj4g PiBEbyB3ZSBuZWVkIHRvIENDIExpbnVzPw0KPiANCj4gTm8gbmVlZC4NCj4gDQo+IEkgcHV0IHRo ZSBmb2xsb3dpbmcgY29kZSBpbnRvIGEga2VybmVsIG1vZHVsZToNCj4gDQo+IHR5cGVkZWYgc3Ry dWN0IGxpc3RfaGVhZF9zaGl0IHsNCj4gCWludCBuZXh0Ow0KPiAJc3RydWN0IGxpc3RfaGVhZCAq Zmlyc3Q7DQo+IH0gbGlzdF9oZWFkX3NoaXQ7DQo+IA0KPiBzdGF0aWMgdm9pZCBub2lubGluZSBz b19zaGl0KHZvaWQpIHsNCj4gCWxpc3RfaGVhZF9zaGl0ICpoZWFkID0gKGxpc3RfaGVhZF9zaGl0 ICopa21hbGxvYyhzaXplb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