From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABC36C282CE for ; Tue, 4 Jun 2019 17:00:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8AFD020717 for ; Tue, 4 Jun 2019 17:00:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728021AbfFDRAE (ORCPT ); Tue, 4 Jun 2019 13:00:04 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:49732 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727715AbfFDRAE (ORCPT ); Tue, 4 Jun 2019 13:00:04 -0400 Received: (qmail 6565 invoked by uid 2102); 4 Jun 2019 13:00:03 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 4 Jun 2019 13:00:03 -0400 Date: Tue, 4 Jun 2019 13:00:03 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Linus Torvalds cc: "Paul E. McKenney" , Boqun Feng , Herbert Xu , Frederic Weisbecker , Fengguang Wu , LKP , LKML , Netdev , "David S. Miller" , Andrea Parri , Luc Maranget , Jade Alglave Subject: Re: rcu_read_lock lost its compiler barrier In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 4 Jun 2019, Linus Torvalds wrote: > So I don't technically disagree with anything you say, That's good to know! > I just wanted > to point out that as far as the kernel is concerned, we do have higher > quality expectations from the compiler than just "technically valid > according to the C standard". Which suggests asking whether these higher expectations should be reflected in the Linux Kernel Memory Model. So far we have largely avoided doing that sort of thing, although there are a few exceptions. (For example, we assume the compiler does not destroy address dependencies from volatile reads -- but we also warn that this assumption may fail if the programmer does not follow some rules described in one of Paul's documentation files.) Alan From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============1456908058315907277==" MIME-Version: 1.0 From: Alan Stern To: lkp@lists.01.org Subject: Re: rcu_read_lock lost its compiler barrier Date: Tue, 04 Jun 2019 13:00:03 -0400 Message-ID: In-Reply-To: List-Id: --===============1456908058315907277== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, 4 Jun 2019, Linus Torvalds wrote: > So I don't technically disagree with anything you say, That's good to know! > I just wanted > to point out that as far as the kernel is concerned, we do have higher > quality expectations from the compiler than just "technically valid > according to the C standard". Which suggests asking whether these higher expectations should be reflected in the Linux Kernel Memory Model. So far we have largely avoided doing that sort of thing, although there are a few exceptions. (For example, we assume the compiler does not destroy address dependencies from volatile reads -- but we also warn that this assumption may fail if the programmer does not follow some rules described in one of Paul's documentation files.) Alan --===============1456908058315907277==--