Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1482414lqp; Fri, 22 Mar 2024 17:21:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXumGSR+z6fVm9x5URr1OZ+Y8OT1FyZV7zQ6muvKJUptzXDda1uwWGYwCi4UfAiOm1aA3mKr81gE1cKsbwEQDGK8VcdHvZoVR9/AlSSww== X-Google-Smtp-Source: AGHT+IFjQdJnlf5VeRzuZjFJc2K/8L/gGLC4OGwPMokHK1aiSQuAuHsUjJWJvFGsXzMTDthSmQ4S X-Received: by 2002:a05:6359:6287:b0:17c:2b72:3b7e with SMTP id se7-20020a056359628700b0017c2b723b7emr667494rwb.4.1711153302749; Fri, 22 Mar 2024 17:21:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711153302; cv=pass; d=google.com; s=arc-20160816; b=K7XIksU+/17uaXghylVpj0KSOB9pKlBEAC93w7CWz2rqXihFZJMpNvKgq3ju4rj1mv 14v+8g9qHeZO7azNOhdeK5Rp1AivO9GnvceN+3kfgDUcEzvkRBIpfkO2G94eYVuQUHv3 5q6HmYppaz2B+jcTxgrj/NfUJCPOvhqd1SJ1xHXxnRJXK2IUJl+EG857QpGvR6nXfMSd YpN5xWbtGzIoV60H86UKvCWX5+d2CFityabC4auXucjGGFkLRkWdeyzW/Dye1ZOKrLh1 r0CV9cA5ien+t2c2xUO+IBJSA9IMPPXO+vvtal1XzcJjW/iSl8hJzEu/WYUZSiXdwSpl 6otg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:date; bh=RdNz/STIRdapZrDiaLvH7XN2qY1HG1kHxZd/Wx1Un8Y=; fh=H7P7RRByZh71f3myXxyTXwOcjRwFbg7AdeGQ55lVSbg=; b=UeUWhqTfmIAB1/oIZZvJHQTEeXoA6ggSvR+Vk1kt2c014C4yOUtc+da4by03BbiRO0 /w7KvygyRJpqCdvYQ8puqHuDNULhvw1ijOESxe3Y9cZBpxpg6aIkO0vMlq6poiHTJ6bm Dc7wlbNE+c9G/i1ki/WmkGltYgyBHlaqCfSS/CkHbqwCWC9QnBgUlLjXNT2FbSIIrUZu htnoR5i6MjLp+DOQmxeIlmC/FzapgNKGzMm+d0B+kMhGbv+qoBbWmffFc+9xsgMHG+/+ wljmrLn0L+RWGH3V8rqo4LRPQRSvg5DPTKJloAuqY70NdCygc7QFV4OjkOQXreodKIL3 NtSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=J5hqVNg1; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-112132-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112132-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c22-20020a63d516000000b005dc9bea60fdsi3116414pgg.415.2024.03.22.17.21.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 17:21:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112132-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=J5hqVNg1; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-112132-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112132-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4CDC02849D4 for ; Sat, 23 Mar 2024 00:21:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C8A1FA20; Sat, 23 Mar 2024 00:21:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="J5hqVNg1" Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 428BA7F for ; Sat, 23 Mar 2024 00:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711153295; cv=none; b=Zb13Hb/iI4pn5adQgoaVWiKMIVxknO0s30ScR18rrp6J+9WPTPfrtZx9pCK7JiwLIUJ4msWYUQD1HzG0zvTAz6CKXhuQcQxvgPX41EWuczCKZIgtgrgDSRISr4C9oMBwOdi1dvcwaOh0jk5WLWkXEmF0ev84t2EVYru5bLZ4S14= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711153295; c=relaxed/simple; bh=3oVdTJIWwBdIc+TKQQRMm1GvKnrkgkGxIRm7Lek5enI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IGhvQv8E3oPDET9E7nSE1FbizkbVoQAVHxMlHZSxmGqbwbi0R7kFR7XpMBkPe3qRVoqXYKLdwBmtfjnP3WKnXSYAGl1lhmD4IOG0uWoeeSv4F0nnrFe0xsHPmbBWiZTNhoYfbAKzqFDBU1R2AXtW/U2de+J35NVnoLPHJkzc27Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=J5hqVNg1; arc=none smtp.client-ip=91.218.175.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Date: Fri, 22 Mar 2024 20:21:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711153290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RdNz/STIRdapZrDiaLvH7XN2qY1HG1kHxZd/Wx1Un8Y=; b=J5hqVNg1ovC1cbzfglT1Aem53QApQiVgxGvj1QDflZlBhq5mrj7tPfnyEQpgE2h10cg3/9 iRsZTFnNWZV/re8Qg/Q5rC5Kx+tv0Q0j1AXf9fr6v6KVn0TMsvEebKi9uxB9gZHRpvMlyO TPZkam0JSNG3vbeP00+HbzXJYh36TUE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Linus Torvalds Cc: Boqun Feng , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, llvm@lists.linux.dev, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?utf-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Alan Stern , Andrea Parri , Will Deacon , Peter Zijlstra , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , Nathan Chancellor , Nick Desaulniers , kent.overstreet@gmail.com, Greg Kroah-Hartman , elver@google.com, Mark Rutland , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Catalin Marinas , linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org Subject: Re: [WIP 0/3] Memory model and atomic API in Rust Message-ID: References: <20240322233838.868874-1-boqun.feng@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT On Fri, Mar 22, 2024 at 05:12:29PM -0700, Linus Torvalds wrote: > On Fri, 22 Mar 2024 at 16:57, Kent Overstreet wrote: > > > > I wonder about that. The disadvantage of only supporting LKMM atomics is > > that we'll be incompatible with third party code, and we don't want to > > be rolling all of our own data structures forever. > > Honestly, having seen the shit-show that is language standards bodies > and incomplete compiler support, I do not understand why people think > that we wouldn't want to roll our own. > > The C++ memory model may be reliable in another decade. And then a > decade after *that*, we can drop support for the pre-reliable > compilers. > > People who think that compilers do things right just because they are > automated simply don't know what they are talking about. > > It was just a couple of days ago that I was pointed at > > https://github.com/llvm/llvm-project/issues/64188 Besides that there's cross arch support to think about - it's hard to imagine us ever ditching our own atomics. I was thinking about something more incremental - just an optional mode where our atomics were C atomics underneath. It'd probably give the compiler people a much more effective way to test their stuff than anything they have now.