Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp103235lqh; Wed, 27 Mar 2024 16:37:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJrZkUpVVFB0Aasqx8NWiFNkPBIZb6pI4mpTtmni0FpoMBztSSMveCnuwiqQOkkS8WG45pJpUDmRqjTp8P5zbFmAWyYQoawJd36eVkEw== X-Google-Smtp-Source: AGHT+IGMEn+TwUpIrmsU7//k/JxQ2ZzeO8OQSOeMHoc9H34VzqMIqkwb6Yt5JQL2iiWTCLlXYvif X-Received: by 2002:a17:90a:982:b0:29f:b55c:68d9 with SMTP id 2-20020a17090a098200b0029fb55c68d9mr1205942pjo.21.1711582643684; Wed, 27 Mar 2024 16:37:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711582643; cv=pass; d=google.com; s=arc-20160816; b=Yfs/clR0QPlMm7fs49hGDagMMgqDahPqV8Yt3X/Ggyvj1GMW1ZPq0P0IcWuPyBTE5i NKdB48A9/0qMfbASUvS2s3rIvELp2nfIgvj29nvT9wapjleQIuLBWB4yLplIxP+soF0q lktS44oHFN0jLUyi46oFJW1ej3DqZiUbC9NKOk+ea9iEdyKs+ikhAct+YheKCT9+UpYo ObzruiuVgpK1npXTWFV88RZZZXYuvHj32gqYgDnVIrUUBZHC9pmarbkkc1GnLAxPpeky O0zEaPXCXigNxll2crt1oeFgkHV6oJAWIfxZEUbhUr+DHTjSxEyUY450tK3KcCh7zk51 ot/Q== 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=kyr6r49yidhJsKUTui64nFbL4DNm+avYdIXieZOZcaY=; fh=SOmxtNc7LNDORXxo+Uy7824nbgK7IimSMOBleLXjwco=; b=LudgSRubLcDeKtZUj2VVHiM+pQc8TC0YjjhxQqNTET9MzNB2MFFFSTiq9EQzU4r2x8 MIZ+2Ob3Z7GxF6iMZYPHB0XPGn8MYvzhYkz5TTCHTDg1dtaf/ANHxPqbOw/xPjNc3zHt +lT/a0otD78zbpC6YyuFA4wDEht8RiHiYgSVJkjlJEOg4p9VWM/TvD/YHumRY+2OZY3Z BWiymzUJ5tBmKQlxlBhSjEKYSOixtbfzg9Wp9EUl3f+AZEbL7swecUw+F707bRrT/tlS mLydfsQpknJLtw+svy3fn7nxOmRX6EP9VNNN4CD5YnnUO1t5JkQRfqWmuFvoLB0eWdQ+ yziA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M3TFh9ja; 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-122191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122191-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 r63-20020a17090a43c500b0029c5b195b5fsi2414301pjg.175.2024.03.27.16.37.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 16:37:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122191-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=M3TFh9ja; 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-122191-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122191-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 A6F9F29FDC0 for ; Wed, 27 Mar 2024 23:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9EFCD136E1C; Wed, 27 Mar 2024 23:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="M3TFh9ja" Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (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 063D415443F for ; Wed, 27 Mar 2024 23:35:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711582550; cv=none; b=M+5oY6YVjbSArlx2+nnGvcytbA5YZkuEJ4wWjhPxs7qJzjyRTRB6thmvlyoOer9qQTCVHna9gld/1D5lMibcIZ5bpkL7BOjMWCl0uwhGGl39/8zI390gfuB3SjG2aUCX+PpGiEKPn+yRWa+DS9tMGUSF5qqQCEJwfv3ZgA1h8CA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711582550; c=relaxed/simple; bh=xkBP270Wrqe98MexcD6HIuIpMWYJMnbzhP17BG8Q2Gg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cV/4wf/tYDfD1I3BnRAlII3o4UOnvAMtaqVV/g6t2fBcBgzGcOvX9C5UHamhBemVaArp6BYQc0Ep8M4w5vuBTd/0MG2NH8Py+/Kbr9j/zmzC0D+anKQ/6/YCJ6V9sSBjoeHze3GmkhVcOzGTo0v+4jOBB1LBJ4I5NPTjTXfYfwk= 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=M3TFh9ja; arc=none smtp.client-ip=95.215.58.173 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: Wed, 27 Mar 2024 19:35:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1711582546; 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=kyr6r49yidhJsKUTui64nFbL4DNm+avYdIXieZOZcaY=; b=M3TFh9jarTrlSwg1Hd3LxsdCADhyi15sAjIQfsgPibimB3Mn0Yknm2azjPx6C7aHaqZTGL ZJMH9Jrg+Q6GKan/n0ZlVVYLJ7zpnOCcaFNhoOQ1yaOjCGmXDGDr5O7JgvSsX+WyCPznk5 l6Nt7HD73IpgAwSW/TCOe9wu08NDBf4= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Linus Torvalds Cc: comex , "Dr. David Alan Gilbert" , Philipp Stanner , Boqun Feng , rust-for-linux , 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 , Marco Elver , 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: <4tyipncgbrl5yidulxcsobk6pq5jl3dvzkqtckrqjldqpsh6bm@q5xeyqz5j2to> References: <160DB953-1588-418E-A490-381009CD8DE0@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 Wed, Mar 27, 2024 at 03:57:12PM -0700, Linus Torvalds wrote: > On Wed, 27 Mar 2024 at 14:41, Kent Overstreet wrote: > > > > > > On the hardware end, the Mill guys were pointing out years ago that > > register renaming is a big power bottleneck in modern processors; > > LOL. > > The Mill guys took the arguments from the Itanium people, and turned > the crazy up to 11, with "the belt" and seemingly trying to do a > dataflow machine but not worrying over-much about memory accesses etc. > > The whole "we'll deal with it in the compiler" is crazy talk. And Itanium did way better on Fortran, but all those spills and reloads due to aliasing that an OoO processor can hide are death when you're statically scheduled. Unrestricted pointers are fundamentally a real barrier to improved ILP. It's not _all_ branches and cache effects, though I will grant you that cache effects do dominate. But I think there's hope for improvement on that one too. A _lot_ of kernel code defaults to lists instead of vectors even though we know that vectors are better for performance - beacuse people are afraid of memory allocations and error paths. Rust makes it way harder to fuck up your error paths, and also makes it safer to refactor to improve your data structures.