Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp935042rdb; Fri, 1 Dec 2023 02:37:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGR/u5TkRX99qyOm/lO3G29kZZnMuxoQKyt3gF/GYPOxW/uNn8FSmb1/mBVeDeq1PkLr05S X-Received: by 2002:a05:6a20:914e:b0:18b:9287:eab9 with SMTP id x14-20020a056a20914e00b0018b9287eab9mr27457854pzc.52.1701427023693; Fri, 01 Dec 2023 02:37:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701427023; cv=none; d=google.com; s=arc-20160816; b=QvazE4K1l3L6EaiwD/nNWXa4y2jBubOUn4HJXwCYVJ24bbnE4O6XYHkWk8fJYrqXxa YLscRv1aVYpXJzN3fSGZ9rRgpp68VG5IyaZtO0sbQNwJR0FA7CHj9CIa99V0ZJccQyR/ xYF1zTmPBp2gmcPppee5yO5tKx1vUSN1doyvm4Vp1rCjlcX/OBXgilKW1016Bii1ehx9 UpQNxrO6jdGTbrdbEBDcAxQDeVPeJW4W1lurfhGWC1P6J87A20j+woUom6ZSm2B3b0Ge wn1qpcSmdBM65M3wTHwRCCeszPHXIxCMPJmJ8j2/nGPddL/6jJvovJA51hu27Bp71u38 ELpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature; bh=+1CSvziGe/qbcOkKXo9IQPR3y1xjDPlILN2WHHl8yYE=; fh=TGooMUIhrAD1aQNum7cAGmjPsdCTF2FYfESUpHILi/s=; b=R3R3tmNBzuw8Jkwk3t38a+bj+xY2f5ArzCGq2PTMxVesn/xXY6eX7coSNITdabeu5d JKvDiyt+WdpqGzQeNyOop+e2j71p5xyNMrwJQMQepZCn4NgeFa66FtLtVw4gCN2j4VnZ Tkgluhu5DI+tV2dtxn1nn/SpqTC1dYyssZa2WHaBEQS5/H/Kf2mgYw9K8vmaHwZZDl5f X2nH/wgi61Fmn2ZRJqyjvFtV2h1glqGovYy47dG9WJGxDBOGTy5vE1N0fhUR7BQI8w0n 9vaQMPcH13xOUla76TnG+f/S4tKveIEfNr9scj7pd0fOa3lXNsqEtIuHo+xOVf9biZ9j TgQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EAX2L9u9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id f6-20020a056a001ac600b006ce03e254a6si680709pfv.40.2023.12.01.02.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 02:37:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EAX2L9u9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5518B83D7E33; Fri, 1 Dec 2023 02:37:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378272AbjLAKgk (ORCPT + 99 others); Fri, 1 Dec 2023 05:36:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378239AbjLAKgj (ORCPT ); Fri, 1 Dec 2023 05:36:39 -0500 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E347DE; Fri, 1 Dec 2023 02:36:45 -0800 (PST) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-67a295e40baso10816686d6.1; Fri, 01 Dec 2023 02:36:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701427004; x=1702031804; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:from:to:cc:subject:date :message-id:reply-to; bh=+1CSvziGe/qbcOkKXo9IQPR3y1xjDPlILN2WHHl8yYE=; b=EAX2L9u9pfQmtiQ7puEQ0bQB43z+FHTSKdwWQz6a39zOwe3gpcgzjfEF+5Y7TskRLd FX1BpsQzVoIlOwCRdaGNgPpPTEuJX9QwxtTPhDGwrAMv6y9ukma2Gpe6jcOgHSjatRjG UVC4NNVY1W0oXZTh7IDMTGyBqH8/3lrp97xDvVCwTVG19l9toEawUV4tozOqdtTuZ04m vZNiXxWP9QbvUJ+o64gJHnczpgY4HDUG0apuwce8fvX9gyi5e/sW+C8SZ73Maw6pkGMJ ycLz2+ZXk3ZVZ4v4WDpckFSBkmUh7mbyqBxfX4AvR7DtDludtfw2Cy00fkZS/e0xTpMR +gyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701427004; x=1702031804; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:feedback-id:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+1CSvziGe/qbcOkKXo9IQPR3y1xjDPlILN2WHHl8yYE=; b=bxRvzz1mxRIyEifnWIIMZ6L3wgGw8zgYfmGKhFTNW9ilJweSXTv65BO/TvXYsHIF8O WBhFweONX230EnCaRn7yoaLjTJVL0jkpzXn5d4FM8E4ERZeORAI/0oC1uNLvxo0usLT8 6jlOsee3V2LdwXMBnHw1MPKj5+qAOznwhnjpCQanndUYOzLBy6WeC9+Rp3xF8sx0UoWm NE5yvmonjA77vmhbZ1DJamPzNvd1RGmo51RZ9be4B2GqHXSLZvrOwC0E/D9JQJNVxtD8 6DWVR5ucP1vBaYTXka7QWM9q/FfmTjx4PyTZIvrilcLZveL+rB5Yr0d+Qm+V2g8wKq0e o77A== X-Gm-Message-State: AOJu0YxPMRS8BdEIR/aRBaftHe/RLr+QjBygJWrrkqfOIqT2ya4PsKY+ Wj36dzcXYRCq8vYtqtp0sJ8= X-Received: by 2002:ad4:42c3:0:b0:67a:4709:34bb with SMTP id f3-20020ad442c3000000b0067a470934bbmr16104179qvr.41.1701427004422; Fri, 01 Dec 2023 02:36:44 -0800 (PST) Received: from auth2-smtp.messagingengine.com (auth2-smtp.messagingengine.com. [66.111.4.228]) by smtp.gmail.com with ESMTPSA id q20-20020a0cf5d4000000b0067a4452d459sm1380580qvm.116.2023.12.01.02.36.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 02:36:44 -0800 (PST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id 6D28E27C0054; Fri, 1 Dec 2023 05:36:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 01 Dec 2023 05:36:43 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiledgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpeelueeiffdugeeliedvjeethfettdeiffffueeiffelhfejgefghedtjedv ffffhfenucffohhmrghinhepghhithhhuhgsrdgtohhmpddttddttddqihhnlhhinhgvqd grshhmrdhmugenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegsohhquhhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdeiledvge ehtdeigedqudejjeekheehhedvqdgsohhquhhnrdhfvghngheppehgmhgrihhlrdgtohhm sehfihigmhgvrdhnrghmvg X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Dec 2023 05:36:42 -0500 (EST) Date: Fri, 1 Dec 2023 02:36:40 -0800 From: Boqun Feng To: Peter Zijlstra Cc: Matthew Wilcox , Alice Ryhl , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alexander Viro , Christian Brauner , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Dan Williams , Kees Cook , Thomas Gleixner , Daniel Xu , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org, Josh Triplett Subject: Re: [PATCH 1/7] rust: file: add Rust abstraction for `struct file` Message-ID: References: <20231129-alice-file-v1-0-f81afe8c7261@google.com> <20231129-alice-file-v1-1-f81afe8c7261@google.com> <20231129152305.GB23596@noisy.programming.kicks-ass.net> <20231130104226.GB20191@noisy.programming.kicks-ass.net> <20231201085328.GE3818@noisy.programming.kicks-ass.net> <20231201094037.GI3818@noisy.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231201094037.GI3818@noisy.programming.kicks-ass.net> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 01 Dec 2023 02:37:00 -0800 (PST) On Fri, Dec 01, 2023 at 10:40:37AM +0100, Peter Zijlstra wrote: > On Fri, Dec 01, 2023 at 01:19:14AM -0800, Boqun Feng wrote: > > > > > https://github.com/Amanieu/rfcs/blob/inline-asm/text/0000-inline-asm.md#asm-goto > > > > > > Reading that makes all this even worse, apparently rust can't even use > > > memops. > > > > What do you mean by "memops"? > > Above link has the below in "future possibilities": > > "Memory operands > > We could support mem as an alternative to specifying a register class > which would leave the operand in memory and instead produce a memory > address when inserted into the asm string. This would allow generating > more efficient code by taking advantage of addressing modes instead of > using an intermediate register to hold the computed address." > > Just so happens that every x86 atomic block uses memops.. and per-cpu > and ... > Oh yes, I found out Rust's asm! doesn't support specifying a memory location as input or output recently as well. I don't speak for the Rust langauge community, but I think this is something that they should improve. I understand it could be frustrating that we find out the new stuff doesn't support good old tools we use (trust me, I do!), but I believe you also understand that a higher level language can help in some places, for example, SBRM is naturally supported ;-) This answers half of the question: "Why are we even trying to use it again?". The other half is how languages are designed is different in these days: a language community may do a better job on listening to the users and the real use cases can affect the language design in return. While we are doing our own experiment, we might well give that a shot too. And at least the document admits these are "future possibilities", so they should be more motivated to implement these. It's never perfect, but we gotta start somewhere. Regards, Boqun >