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 1B54EC27C6E for ; Sun, 16 Jun 2024 17:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Pb/VuEkpep0deG9cMLgNvTgMKIQq7qL3KwU1FP8n8Zw=; b=jpfNNfG9YhPDs3a/dvRqkDgb4l YKihjfby2H3iMVisDJZmEnd4QnV+kFuJxsv/WDy0ONnTgFcJaiBHzjoxxmvHHMamQWjGxz+qaiZe/ HjTKlnihNpt79QocNxgLUU1x8NphixaZvAzfN5UaRQxMm2yfSh6noqtschCqMEk5Kr4GRUE29Ke0J g/fUhhGzHjG71Kn3PmTCiCUn3Suo9gHQuIfVi/PSvKVgAYLqUB88wx/WvnJzoJ5DXMgiPhcUwHY6y S+9l8FXbJLzlij62/IB9vja9sL9EOsVX++zj8exruFkSRCHqsV26bPGHybEMkXO5MfC02d1x+MAH4 Kp7IWmCw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sItJc-00000007w91-3QYf; Sun, 16 Jun 2024 17:05:16 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sItJZ-00000007w7s-2NOM for linux-arm-kernel@lists.infradead.org; Sun, 16 Jun 2024 17:05:14 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3d226aff122so2057693b6e.2 for ; Sun, 16 Jun 2024 10:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718557510; x=1719162310; darn=lists.infradead.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=Pb/VuEkpep0deG9cMLgNvTgMKIQq7qL3KwU1FP8n8Zw=; b=GDf5tENB5QIVEFHrd9neIiticPPEUAXfptUNyz4n9qmoC5pIwNa1Z9FrY3e4jo9r7e a+MjrWHLRtqRg0cbxosuO1n6bpAkJuipmzW0doUeJ0oYxFAme+5XTuSp42D0DrDhwrGu 1aAWYuhQpaWDZ0mRxMJV3ucr+b5sJI1P/xp2haR0Dc9xfJdVZr44rnx0w5jpAjwz2/jy Nxo/e6dtQCMzfEKrJsWriNpfOTRsIuL7exalAqsv6SOCcMVVM10Anq1dnBGXNoigRpVv TA9SlYwkwehKPsh5T2GP2ZVKRDmrwppbRgahLoyICpSNeaq28OQXataCIt0WczoYJ8zj ylLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718557510; x=1719162310; 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=Pb/VuEkpep0deG9cMLgNvTgMKIQq7qL3KwU1FP8n8Zw=; b=laN+ZP7aipqZmQOfz/tuICP3yBq1wqHZFqILUgnMwWgl1IGak0Mkwlc69SK3Vobjxt h/UIooyRNKM/5EkwfrmcxQqu2m8m97BUZWoDTl0t2ge+8E30uqqGhsZpHhTNFBaIL503 HYM7UPpujUjNr0nc/sGojDi7+rgnowH+cykSUpuTVlozMtSSr+hW0g1eJPozGWFmexj5 xtWba5gZZelyj/oznNvfO7QRtEm3pA8dqxUOAkhW7wGVtOiRlbsK8zG2Nur9LdmGgzM/ oQhSBt1abHcZDoOJ3j07AlEvdBPV2NoWGVquAk8DMGRw2UT144NdWP74wRzJe/qA3ntR glBA== X-Forwarded-Encrypted: i=1; AJvYcCX8tD9w8APe2CWLCc6c2A73Xkv+pkXkwZMDMQsCYJ9zG6VD8iFN5b2l1X/kEIrDltwJXx+XIMJb15hQB7INouGLlY22H/CcJLpPai0lxZPs3MyEgfg= X-Gm-Message-State: AOJu0YwsHjMhLzBBAf33A+1Q/jy5+D1NfmmtOmyGj+S1NhJoEIvBoFLr YlgM1uT2ZdAEDfP4Ud57zxOG//5uVOeXjohOeIi29nkzy42L5WH+ X-Google-Smtp-Source: AGHT+IGelQ5mYwaNQtvvsfM75dkmU6tbIL7wNO/AXelpy/8mWu1xuPwyHTXC3de/DOySHWI05Gx5qQ== X-Received: by 2002:a05:6808:1520:b0:3d2:2356:d273 with SMTP id 5614622812f47-3d24e8a9973mr10166314b6e.6.1718557510442; Sun, 16 Jun 2024 10:05:10 -0700 (PDT) Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id af79cd13be357-798aaedc360sm354994185a.33.2024.06.16.10.05.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jun 2024 10:05:10 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfauth.nyi.internal (Postfix) with ESMTP id F3B401200043; Sun, 16 Jun 2024 13:05:08 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 16 Jun 2024 13:05:09 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedvfedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhq uhhnucfhvghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrf grthhtvghrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveei udffiedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epsghoqhhunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedt ieegqddujeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfh higihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 16 Jun 2024 13:05:08 -0400 (EDT) Date: Sun, 16 Jun 2024 10:05:06 -0700 From: Boqun Feng To: Benno Lossin Cc: 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 , =?iso-8859-1?Q?Bj=F6rn?= 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: References: <20240612223025.1158537-3-boqun.feng@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240616_100513_637494_5CF9F2E4 X-CRM114-Status: GOOD ( 13.66 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Jun 16, 2024 at 09:46:45AM +0000, Benno Lossin wrote: [...] > > 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. > > I don't like that, why have two ways of doing the same thing? People > will be confused whether they should use `AtomicI32` vs `Atomic`... > BTW, we already have something similar like this in kernel, we have SpinLock and Lock, how should we do about this? Regards, Boqun > --- > Cheers, > Benno >