Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10028144rwp; Thu, 20 Jul 2023 13:28:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEKqNstHWdI41p6YUnjG2xR3uLXCMTV3RHJY2pu5l4c2maJmwr0ZsXqIl5SxAWpOJ6Byi5S X-Received: by 2002:a05:6a20:3955:b0:134:1c06:19bb with SMTP id r21-20020a056a20395500b001341c0619bbmr351575pzg.22.1689884928238; Thu, 20 Jul 2023 13:28:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689884928; cv=none; d=google.com; s=arc-20160816; b=HDK0qJlEd827dRLEavxyUmsvEB+8y1HXw6HJaDmBdt6wE8DFHgwoJenyyEQr5LRonC OeS0mHknxOFFeKxiZ+knQpbKHgAHJGaruR7C9nUlM6g3zzkfMZT3owe6N/RtMpm7Qf4Z C3fWwtHSO0C+BSPJlLnh0bALpCocwjt1eY4A5KW+VMT1mjBtz0rJLFf0ot3br/18WKCr Vgl76eE8A0VT9hAbzQfa+y6mrrC9dgNxmq2lI/tjEqjIReLg4Xnql/+KR3lyjUrztZ5v 3Qks/q/k7UQkZma70QA2D54y4R4qJFrO4HH/YSt0OfwjwgICr0GViLE9w5pWtUu8gYSX a3og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=fRq4kiOe6o3GCeNturgO6VEAqY0DWx/wr2Uqp7KCQAQ=; fh=5TUBEKU0DHvdSb0kmSme0dTfxzk8V2bmoNVFLFpXCdU=; b=VGqd7h+CWr2ausikxoTL2JjAyb/xlVuq0lGg/64P3Igv/WBtE6mZnM7kqVOje3dWt1 5LbMjhAfpYofJim0FLAFY2O5mUtbffmR6OLrB7C1jFdYjp2tjY/vifZoA4Dc6XG/WkjI 48nli9bGFhr0DbexLWuGZtv+ezBzf2NC/QTl+ETpHMBKSVmEHo2L22ULNsU1iqyOLvE6 Jz/B8XWVlM0/DV/IBFDKiKBpZbojDft2Nl25C7j8tISCo0vEEyoMy9mBUgMQQY0qcYbd kGguCqpU4nP5BF6aa2lW8I2c8CtF1vK18niY+9j8eXI2BobPCMfdMUAaJ+98QW72FTYI a2ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fNQQbA+N; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a170902f68a00b001b9eb5d1ea2si1664460plg.198.2023.07.20.13.28.35; Thu, 20 Jul 2023 13:28:48 -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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fNQQbA+N; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229848AbjGTSyQ (ORCPT + 99 others); Thu, 20 Jul 2023 14:54:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbjGTSyP (ORCPT ); Thu, 20 Jul 2023 14:54:15 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B81C01705; Thu, 20 Jul 2023 11:54:14 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1bb1baf55f5so8534535ad.0; Thu, 20 Jul 2023 11:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689879254; x=1690484054; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=fRq4kiOe6o3GCeNturgO6VEAqY0DWx/wr2Uqp7KCQAQ=; b=fNQQbA+N7NG8ROfS0eyXZ4nfFd3AwMKZfpfL9lXlvgIkkHfN/3GoQG+tX3ehHsb8dv wGbxzGoTR581bIPQCfdzJRLm4LeVfm9Kcticw1Jd0mlKfxKfL47vahmEoZ0aeo26qApz tZw3W7WeCo6PYtJqfPkdXYpRjSQjKdveHSHQQZtG5SJWaAtwAVzUxskYt9VVOPmYHvSG m1nLU7HpvcwZCmHKeGfG5qQqvww+eezcjosiQfsJwq9VLeZcPENHUXXbttAxdxyunlqn 0BfdyhYgOUXAij8+5K7/S1BnN2NrWmPUopT0O824l7MoAqrIqkvPPgIVsp1KGXvkbFSi mmmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689879254; x=1690484054; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fRq4kiOe6o3GCeNturgO6VEAqY0DWx/wr2Uqp7KCQAQ=; b=dvcQo+LFj/gEuYAscUDRHnP9nczYY0lOsYfIZ9mZ5/3rrV6ZjRWIzHep0O7QdkrcZx wJmJgofE4C/IwZTUoXtlMfIlHYPfqLNaMn8DFpHe3dGRKMh6EjUQeVCrDr4dmKWbdI5k GAb3qbnLKyfB7qdIo8Wk+TPUWNk7pd2kPUYJN23KInQhlnKh4lLGdNjq0Z0jLJvJOkyL W3OHOvlOtFfKD8cvmyFIXfotuAWEWM0npOrUm53xy6fvtwmSoIFZkyCiUzV2eZ8wtqhA FrnT62qQNVDOsvrMUTJC3u2DPGcx+92ECRgDt2IrVjV1SssHyR2LUeDFBiezmQeXMYyC ibuQ== X-Gm-Message-State: ABy/qLZTKEzPM68atkk/5TAG/+4SWFWTWyVAZdf7OTCMHLhXmn4uOI75 tv7LyNDktqEjOzKhnwD47ogLwwtT9P0= X-Received: by 2002:a17:902:e883:b0:1b9:de75:d5bb with SMTP id w3-20020a170902e88300b001b9de75d5bbmr217104plg.7.1689879253780; Thu, 20 Jul 2023 11:54:13 -0700 (PDT) Received: from smtpclient.apple ([2402:d0c0:2:a2a::1]) by smtp.gmail.com with ESMTPSA id n7-20020a170902d2c700b001b9c960ff9bsm1762792plc.78.2023.07.20.11.54.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Jul 2023 11:54:13 -0700 (PDT) From: Alan Huang Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Question about the barrier() in hlist_nulls_for_each_entry_rcu() Message-Id: <04C1E631-725C-47AD-9914-25D5CE04DFF4@gmail.com> Date: Fri, 21 Jul 2023 02:53:53 +0800 Cc: "Paul E. McKenney" , Eric Dumazet , roman.gushchin@linux.dev To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, rcu@vger.kernel.org X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Hi, I noticed a commit c87a124a5d5e(=E2=80=9Cnet: force a reload of first = item in hlist_nulls_for_each_entry_rcu=E2=80=9D) and a related discussion [1]. After reading the whole discussion, it seems like that ptr->field was = cached by gcc even with the deprecated ACCESS_ONCE(), so my question is: Is that a compiler bug? If so, has this bug been fixed today, = ten years later?=20 =09 What about READ_ONCE(ptr->field)? [1] = https://lore.kernel.org/all/1369699930.3301.494.camel@edumazet-glaptop/ Thanks, Alan=