Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2774334pxb; Mon, 19 Apr 2021 13:39:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJt4oSnrri2OPFGkFefCu0HZnAO6wNPnQL1ZgiDXQh7sh4Jis3efbAKnF5cZCh9t6voNfX X-Received: by 2002:a17:906:95cb:: with SMTP id n11mr24528465ejy.251.1618864773529; Mon, 19 Apr 2021 13:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618864773; cv=none; d=google.com; s=arc-20160816; b=L+BZDaSIsffnmnBnovTqeFLbiR0hoXgBMiCDPRb/nR6Rq1HC6vkWlij0xBSX0IveiM kHd2AKCSQxtMz8BE/hw3YSwcFa9ucgbJ6IM40JBqWmT0vWzdWAYmV1UeMmUUlAAG/yaV ezZHG25S6B+i0lzVp8cyN7gUcP4VIqxU1Z2KGvbDUk15Blytj2SZLG2MYs7bdYnY/88B 2Urg6zLzNFTz/gxV87tZzrfW68mNNkzfxDvVQbqGUkYHdOXzhm4A+lEDGEVX5CUz4SFy BrVjaxb+SuIiIinc3KOP0aFHM4pavHLq8is2kTiLawAr4dErFFmTIDMXy3Hbq8ldZZlf iVgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/Bmo507F/5bu9hlmYhlWeaouTUfAlwfQadzbAaH/r4I=; b=FIUcIqmDR8LsFnYEJXIn6NNFvGq9bXK/89agVwS+XegnoywLTnfvh0Z4yyWRsPpznF 3VnW4s9V/uDjb51U3fdDyx5lrABHdmvHgQP4ur7b9UfvKp8WxTC0pvc1OXS9Jw7bLNyZ bQnFa9Q7dKykYIVt/5g4rP3OddlMU02k1piNwaWr/70A/0VWo5lWzFCtwd/EYLVioqNZ 89lT0v1cSCTtMY0AC0PDbvcSA4990L5/zIy/QAO0XvV4R1tyiyEOJX078mVIFXjVrUH5 +PGgUGT/OmRrV3enO/0SeT5Uv82twSf+LAGGcw+gjWdiJmShMWFmBIj0RXnt1fZt66R+ ving== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gcayjzMA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k1si12834179ejp.353.2021.04.19.13.39.09; Mon, 19 Apr 2021 13:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=gcayjzMA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233720AbhDSRPk (ORCPT + 99 others); Mon, 19 Apr 2021 13:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237548AbhDSRPj (ORCPT ); Mon, 19 Apr 2021 13:15:39 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EB56C06174A for ; Mon, 19 Apr 2021 10:15:09 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id f41so33775050lfv.8 for ; Mon, 19 Apr 2021 10:15:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/Bmo507F/5bu9hlmYhlWeaouTUfAlwfQadzbAaH/r4I=; b=gcayjzMAFQp9NqJ1mxkmW9p7qdxplYx4g8F2nepPWLeSSv7PVAVP4lSvgwF3EZpGC8 N0jUmMcI3Othw/Kf5/A+/diKhWa9czIi630LzNUbnjlAZtqOIKDcBf+1HY8yYOvY6gHU fg/517SMW0BITGzRRuGmitMhGwyf/Tg4Y0ATw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/Bmo507F/5bu9hlmYhlWeaouTUfAlwfQadzbAaH/r4I=; b=cAOJduvjwSGwgFVF4Fmaq7Dz2kFNBdAWyqohuiZZuyefps4qffdE0wEMcGbXN3zK/M Jpi+zZHRjOOm7CRXNhFa/ryRa0DpKQpmbajQQZIRdLTVSBednpXmhrgaDa3NlgaA69qS fSLQk/No62B8ZPOAZMzNLyvBKCsM3pl52p84J5ATFqhKMepedGHtyrkD8mmPEL1gSDax v2ijXm+SCHllh2c/1R0JUKjpp3a25oYQKVNF72x3zJ5LOdA205bMjRcU44rvIxiVmn2i lK9C7+YW5XNK9J2I8DJVA4GNiZq97rKMStmFJSwIzCa9NSoUU6lToR/whCSScszuI5bT iBRA== X-Gm-Message-State: AOAM530/SycQnEKvji7HgdLneY4lOZySP88iPlUUhkCVVvwkhIZ39+1z 3IndFkwkg3Ke5NFhbuQityby7v2kf5Y/nD8M X-Received: by 2002:a19:520b:: with SMTP id m11mr3654414lfb.157.1618852507752; Mon, 19 Apr 2021 10:15:07 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id d11sm1884427lfs.291.2021.04.19.10.15.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Apr 2021 10:15:06 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id j4so17652044lfp.0 for ; Mon, 19 Apr 2021 10:15:05 -0700 (PDT) X-Received: by 2002:a05:6512:1286:: with SMTP id u6mr12627687lfs.377.1618852505431; Mon, 19 Apr 2021 10:15:05 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <7287eac3-f492-bab1-9ea8-b89ceceed560@redhat.com> <3a874b15-5c21-9ed9-e5c3-995f915cba79@redhat.com> In-Reply-To: From: Linus Torvalds Date: Mon, 19 Apr 2021 10:14:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 00/13] [RFC] Rust support To: Peter Zijlstra Cc: Paolo Bonzini , Wedson Almeida Filho , ojeda@kernel.org, Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Will Deacon Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 19, 2021 at 2:36 AM Peter Zijlstra wrote: > > I also don't see how this is better than seq_cst. > > But yes, not broken, but also very much not optimal. I continue to feel like kernel people should just entirely ignore the C++ memory ordering standard. It's inferior to what we already have, and simply not helpful. It doesn't actually solve any problems as far as the kernel is concerned, and it generates its own set of issues (ie assuming that the compiler supports it, and assuming the compiler gets it right). The really subtle cases that it could have been helpful for (eg RCU, or the load-store control dependencies) were _too_ subtle for the standard. And I do not believe Rust changes _any_ of that. Any kernel Rust code will simply have to follow the LKMM rules, and use the kernel model for the interfaces. Things like the C++ memory model is simply not _relevant_ to the kernel. Linus