From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [91.218.175.176]) (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 5B26D372 for ; Sat, 23 Mar 2024 00:21:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711153294; cv=none; b=aHz45rXR/f5vCHlPjDzaYATmq8OG1BfQ8+iOIFRTKKf9oa5gYLcj7EWY+AMmA+v5LprijiXUSYVXcDwJCMAwnLKc5GXcbDdv6MsHTf+xbQnI2Vq+MrR9EMNIcKfnUqPWZBcqd3KcBIrSv6BZQLiuaguemKq91qWIPu0MuZo9tEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711153294; 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=shsegxLVNRn/qLApbivDMlixLzOQRuKcQFbfJYHV9SMJsnM2YlppLoAWLm3YvUGkrHvu5OZd6C95uX8J9qm3lbOcoO3fbrRJv5V/WNyS5q22uF7GSH/Ygm6+iu+Y8AU9z3I0g5vaUVgUr9ncTgAgbYkk2SeXzhaVAU0bdf93clg= 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.176 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="J5hqVNg1" 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: llvm@lists.linux.dev 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. 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B49D8C54E64 for ; Sat, 23 Mar 2024 00:21:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hgMgQ2S3gP2FwZMnwu7DDdJMaZUQEyqQ6GvvhJBQ4/E=; b=mnhMaWVj1afbB/ /8noaGOPKpNAgHR2xMTvBqjSbHiVGkPUI5NrS+2/DC+NxmbLmnvcha8VPNQhPBu+gX1SNHwU2Orml j83fuNR4esC2Yv4MDxQqEF0tGE9FIFuFWp7xF1O7iboNU+xfHozMbeK0KNCjaO43oF8GRRm2yS9wV QQX50127UqehYx5mS0DWnbKV4jDZbAs1r2t7Bkh4njZqaage7Z6mvNIUY45fqhBhZpw5Wbg5h66NP ObAUDN0GhudBPgFAaam+ScL7AKdhDE563hW02JiwVMVqpP0Wex3muocIpMuBYAORUld/S7FxXN7Oi hFsfmHgQujqOECZTOfcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnp8l-000000091I6-0AhQ; Sat, 23 Mar 2024 00:21:39 +0000 Received: from out-173.mta0.migadu.com ([2001:41d0:1004:224b::ad]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rnp8h-000000091H3-2Avz for linux-arm-kernel@lists.infradead.org; Sat, 23 Mar 2024 00:21:37 +0000 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> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240322_172135_760073_ABA910A0 X-CRM114-Status: GOOD ( 16.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel