Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1746636lqs; Sun, 16 Jun 2024 02:51:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUi4goOsGsHg+gn3KY5B//iV6GZ8kOKRhiMnBiCuN2p0KZYZcyskblN9DkvqFQ8Qg8H1PogjAHAdF1z4MqKDKw1A9hd+Rs2TvL5+vkJqA== X-Google-Smtp-Source: AGHT+IFAtacPKRnO8mv6G2IfN2hEJBRb/XpFmbzP3TmPTGPw5QtGE2IUcmukEv67aiEuKcFEJpHs X-Received: by 2002:a17:906:b7da:b0:a6f:4b5b:4ba7 with SMTP id a640c23a62f3a-a6f60de2641mr467007266b.67.1718531493114; Sun, 16 Jun 2024 02:51:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718531493; cv=pass; d=google.com; s=arc-20160816; b=h/ozOv184Gs04n4VtLYFEFAfF9pDhQwyQB/PiaXHtdxRkvALQuh6z/hgY/aeFWyjCQ ght81QK0NvqhVYe3rutmSuNkdPesYBas79BRgVJCMDNaJ4rlnMHWLtihIZMedSIbz6Af +FTRMINV17XowPukaFY97kikCvSJcMSXyQtwZNNl7/r72FXHoHtrWkTqlCXdpEeqxfts 64GluRzXmFd0RB9OgAPXO3KFfvtHQFMlTcDp3a0S2fEqdcjOsZmoIocL6JRAAhLMRyYe 4tJh+qbGsOs50zDmqQrE5lXQNiFcC+ZX7PhqQhxyvrSPzueLppfwG+WqmJZCphZvLK6H c24w== 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:date:dkim-signature; bh=Sc0GTYUsIOhy53GbTc5pAmG+S0kUyWsfKR1YRXBUAFE=; fh=DGIJ9yYmcqC6vSdySS8Bg5KJA+CYuZWrUNm67yVYYbs=; b=reowqQlnObMFy8i4HVJCaN7aD2IFxuQPZIxP0dvcpykCqL/Jv0o7FGGotxJdqqfVza LojD6dSdzAlLk7j3udv30Y9ERx3Ry2uVupW2SPhjAfQcfICyObb0HGsfdQt7GoY/7fz3 o07UtuEr3+lXSXbowbeS+CVO+D1Gt/FSzQyrylBZpWTcyC3VhdUHK+PMogFerVanm8Zx g860KwqnNOTlXNr6GRFjvTCwGenjcNaKxZv8Q+z8wcDQ7YOKGkx9PMXqJ5/xLGQW7hrU ydjOaN46ZUQ1emJKQ5vA3J171Pw2DLI0Crg5vHAIFEsAnmy1k3R6+zYCKp1PsNCjZWNd p3iQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iesUFZJX; 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-216222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216222-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56e26105si343807266b.720.2024.06.16.02.51.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 02:51:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-216222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iesUFZJX; 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-216222-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-216222-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CBDFB1F21589 for ; Sun, 16 Jun 2024 09:51:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDCF0186297; Sun, 16 Jun 2024 09:51:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="iesUFZJX" Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 3411A16D9B5 for ; Sun, 16 Jun 2024 09:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718531480; cv=none; b=eSzId9koaqy3qCtsBjZSzaCoLjeka6at643HWfLKIH8ip4XphrdX30vnoCBmZBtXxNs3n30UDvlKiSr3qhOse6YKXv3o21ODfSjMRWzby7jTQccfmDEyKEXmBj+K9XxYjseRBLaBwqefuaF1LR+QxKqMaBzYx3/+/MxmUm6JL5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718531480; c=relaxed/simple; bh=n4cx1Z6BJEH5jWA2Zuabkll9jSUK+CtlbukX047kvG4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RKyYVlcNZRiPSilqUX7cC47nr9cKFqGUUC6fFrSWiLhuG0lrEFxve0SS9fx4IgpwISVS36KQqwJiEjT2hwIzFWzd38vPBMvWY2ErUVFE9Tsvw82f+qzHbDoYfo2UCc4suBMHH8MO43P81NV5C3MV3u+GmgjFTr7nzRseTvk6v5s= 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=iesUFZJX; arc=none smtp.client-ip=91.218.175.179 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 X-Envelope-To: boqun.feng@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1718531475; 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=Sc0GTYUsIOhy53GbTc5pAmG+S0kUyWsfKR1YRXBUAFE=; b=iesUFZJXhWISzzq/1WrJCPxUjjWPh+mWd0w/rzEVrhEGyJ9Mu71NzjiWpCZw4M545BFaiX 6I6iA1L5/DyAIpTb5sGMdC+H5Wfr2HYiyZgVOeNRwTrakO+019XDxBDppjj9IzIEeftDxk ehJ13CJGG4rAG8eVqVxA6fTLZTfcuoY= X-Envelope-To: benno.lossin@proton.me X-Envelope-To: miguel.ojeda.sandonis@gmail.com X-Envelope-To: gary@garyguo.net X-Envelope-To: rust-for-linux@vger.kernel.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: linux-arch@vger.kernel.org X-Envelope-To: llvm@lists.linux.dev X-Envelope-To: ojeda@kernel.org X-Envelope-To: alex.gaynor@gmail.com X-Envelope-To: wedsonaf@gmail.com X-Envelope-To: bjorn3_gh@protonmail.com X-Envelope-To: a.hindborg@samsung.com X-Envelope-To: aliceryhl@google.com X-Envelope-To: stern@rowland.harvard.edu X-Envelope-To: parri.andrea@gmail.com X-Envelope-To: will@kernel.org X-Envelope-To: peterz@infradead.org X-Envelope-To: npiggin@gmail.com X-Envelope-To: dhowells@redhat.com X-Envelope-To: j.alglave@ucl.ac.uk X-Envelope-To: luc.maranget@inria.fr X-Envelope-To: paulmck@kernel.org X-Envelope-To: akiyks@gmail.com X-Envelope-To: dlustig@nvidia.com X-Envelope-To: joel@joelfernandes.org X-Envelope-To: nathan@kernel.org X-Envelope-To: ndesaulniers@google.com X-Envelope-To: kent.overstreet@gmail.com X-Envelope-To: gregkh@linuxfoundation.org X-Envelope-To: elver@google.com X-Envelope-To: mark.rutland@arm.com X-Envelope-To: tglx@linutronix.de X-Envelope-To: mingo@redhat.com X-Envelope-To: bp@alien8.de X-Envelope-To: dave.hansen@linux.intel.com X-Envelope-To: x86@kernel.org X-Envelope-To: hpa@zytor.com X-Envelope-To: catalin.marinas@arm.com X-Envelope-To: torvalds@linux-foundation.org X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: linux-fsdevel@vger.kernel.org X-Envelope-To: tmgross@umich.edu X-Envelope-To: dakr@redhat.com Date: Sun, 16 Jun 2024 05:51:07 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Boqun Feng Cc: Benno Lossin , Miguel Ojeda , Gary Guo , 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 , =?utf-8?B?QmrDtnJu?= Roy Baron , 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 , torvalds@linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, Trevor Gross , dakr@redhat.com Subject: Re: [RFC 2/2] rust: sync: Add atomic support Message-ID: <5lwylk6fhlvqfgxmt7xdoxdrhtvmplo5kazpdbt3kxpnlltxit@v5xbpiv3dnqq> References: <20240613144432.77711a3a@eugeo> 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 Sat, Jun 15, 2024 at 03:12:33PM -0700, Boqun Feng wrote: > What's the issue of having AtomicI32 and AtomicI64 first then? We don't > need to do 1 or 2 until the real users show up. > > And I'd like also to point out that there are a few more trait bound > designs needed for Atomic, for example, Atomic and Atomic > have different sets of API (no inc_unless_negative() for u32). > > Don't make me wrong, I have no doubt we can handle this in the type > system, but given the design work need, won't it make sense that we take > baby steps on this? We can first introduce AtomicI32 and AtomicI64 which > already have real users, and then if there are some values of generic > atomics, we introduce them and have proper discussion on design. > > To me, it's perfectly fine that Atomic{I32,I64} co-exist with Atomic. > What's the downside? A bit specific example would help me understand > the real concern here. Err, what? Of course we want generic atomics, and we need that for properly supporting cmpxchg. Bogun, you've got all the rust guys pushing for doing this with generics, I'm not sure why you're being stubborn here?