From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAAE924728A; Mon, 14 Jul 2025 15:34:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752507255; cv=none; b=YzkOxE6Itha41/0fNAejJBJ1W7cdmlkdXx3BfTooviCR1VvBhs/HM0aachNS8fMV0MCaqCOLTBGj0MQrtO6X3ckHNa0Qb8wcVjnWGvM/WN5VHK8N6XTvD4l1ijyhrp7unz3GtmQDZiZrIirPKkiICx29kReriDBaRPujoAzb65A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752507255; c=relaxed/simple; bh=g+O+Onw4EEFGOhr3iVz4F85RgpHcqoS4Sf24nG8i2RY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Xg6Kv214XkjY5dAHYglaHqYDELLNxhSBh4wfv3xr8uGdqcRD+Cce4i21kttpg4kqUbkAvrFhjZ+kkqPi1pGLvfZH+EzzzkoNjcZ2xsEhyC/z0R48ddpLrq9Ej8RNrHIIp74J7HgSxokzBSfBut05JA6HclaCTiRdo8fSoHOpoZU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KuKChJsS; arc=none smtp.client-ip=209.85.222.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KuKChJsS" Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-7e095510a6cso272951185a.1; Mon, 14 Jul 2025 08:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752507253; x=1753112053; 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=y1ah1KiBYa+nQwV3ZRjbCEW6rsly24N5LKmoT4ikCOg=; b=KuKChJsSHs/4J7lLPPny6TRmwphqP1BL+h3MA1EAIPEfMzecsPFBDwy1ADTbs7E7eu 8SW83cwkvgvfd6gQQ8H1A1lZFXhXfCvA96q68zS2iVD5C/Tc69e8uqggL/bPAPt8Kzx3 km3agXf5zg/4/kFbluyb2jxDLkBLNJJLuECKn6Cq8Z+PmtKNHhJzNvhCeUuiuEFo+uDX xUzuv0EbXnYWCSKk8sz6pvufQXcTqJHWX16ERiXrQgFFK0M8/tgu2UNkPNvKMyGjsrdD WKVcWdiZ4yP5DualDuCvu61ndKO4+avmuK74r44Ptrdzi6+a2qHw8l8ihqbxlVcSWIuA 7fxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752507253; x=1753112053; 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=y1ah1KiBYa+nQwV3ZRjbCEW6rsly24N5LKmoT4ikCOg=; b=RTlKnW4ASOEbHktaaFxNo/TKgYZfJ+ibJm2IXgXB38pC6JJmCEQSXdfUP8eIq2nbOu 46GL/JTokxB0DN9EB+gQtFZSovXVjhCafi8dpdKS4jpUYU6R/7JyI1TH4eTD2tX6/kTm 3sapxh7ZszNILzxNDkGeV23FQ5GdfqzCtWP6SX2epNDecinNwfNxMgfyQQM8OIuVSr3B a+GO4kqwo9TFzqN7l9BErJfDDKEIAI/C9m4HfyEs0hoJCw8uABoNMgPFk7FvLMzFHwLu Si8YmZu6Wsg8sX8yIhczvb86NQqlQ90dm0uvo+cX45j6MmMgG5ZI0OtQ9DkFZXdeK2+i tXUg== X-Forwarded-Encrypted: i=1; AJvYcCUY5irTrocIlWS7WeSqoddUiBk/ZdYQ0hIOCqjyPACJL2/QciNaHMpn8VIwaBxil9/+crudtTHRoXvf@vger.kernel.org, AJvYcCVvp6bmwUuiyxbzAQoSNIj4Cd0OBNfz4iDEF8+AgHEcvZrgEepd9n1CCmcUSRI2mNnO6nCXQoWJl/gn63wxN2M=@vger.kernel.org X-Gm-Message-State: AOJu0Yz52PpLipTPuWd/LYz3lwCp6NwM/gY3f7XQtjdzCQBJGBi2/r/9 ccz2PnsxfY1uBbRq09ski1nDPCIbDQXR7LjpcYwsOnSU8EeWByh75HP3 X-Gm-Gg: ASbGncviMAkDBF3SiQgZnQN4tKMNyTFyqwbqad2t320Vhxez5IMPV0BCmK7vE8va04K tf20jZhBTEM/vsymqp69mwuNoaLeAgGT2sdMBrW1vMPmg9daM3xtRs8s8hKlfdFGtWpyKOssnD4 afej1tuzquA5FjYCdFWBTnq+fAaOuEuJ6X9Vohxj+O1ell3BaPrR7O2HxukaqFiymGkxG6C04o3 QLVBLDtOfhPgJGAu5uIi0mwuiZ7RHbhqgycjW3nBx9azNoM3FmZKwefVkQRU+P6u+S/djbMBZAE bbaDPxe69X93IUJpU4Qz8gQekUaTqDWIAQPeCC5Yk8bx+vfIeoQQoYazgV+zidGyXyGlO+RtBys p6j20D0qo3nsU+iFOAgoFb0zef/i5BGphbE0/UJDc8BoBus9wXND00+beTDOJGSTzKmRZJSNkQb M7fA0l6MDDIHZe X-Google-Smtp-Source: AGHT+IFmUKHtXtb7dpJhb3zmSZ1eVrPeDqvK2CSHNEiPnxRXmpl4kr66ZO7VxCg9aDpOs9IfcA6Fkg== X-Received: by 2002:a05:620a:3190:b0:7d4:4b9b:3eed with SMTP id af79cd13be357-7de05769905mr2084229985a.25.1752507252602; Mon, 14 Jul 2025 08:34:12 -0700 (PDT) Received: from fauth-a1-smtp.messagingengine.com (fauth-a1-smtp.messagingengine.com. [103.168.172.200]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-7049799e407sm48780616d6.23.2025.07.14.08.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jul 2025 08:34:12 -0700 (PDT) Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfauth.phl.internal (Postfix) with ESMTP id 74DFDF40066; Mon, 14 Jul 2025 11:34:11 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 14 Jul 2025 11:34:11 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdehvdefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeeuohhquhhnucfh vghnghcuoegsohhquhhnrdhfvghnghesghhmrghilhdrtghomheqnecuggftrfgrthhtvg hrnhephedugfduffffteeutddvheeuveelvdfhleelieevtdeguefhgeeuveeiudffiedv necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsghoqh hunhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqieelvdeghedtieegqddu jeejkeehheehvddqsghoqhhunhdrfhgvnhhgpeepghhmrghilhdrtghomhesfhhigihmvg drnhgrmhgvpdhnsggprhgtphhtthhopedvjedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtoheplhhoshhsihhnsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqd hkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhsthdq fhhorhdqlhhinhhugiesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlkh hmmheslhhishhtshdrlhhinhhugidruggvvhdprhgtphhtthhopehlihhnuhigqdgrrhgt hhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehojhgvuggrsehkvghrnh gvlhdrohhrghdprhgtphhtthhopegrlhgvgidrghgrhihnohhrsehgmhgrihhlrdgtohhm pdhrtghpthhtohepghgrrhihsehgrghrhihguhhordhnvghtpdhrtghpthhtohepsghjoh hrnhefpghghhesphhrohhtohhnmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 14 Jul 2025 11:34:10 -0400 (EDT) Date: Mon, 14 Jul 2025 08:34:09 -0700 From: Boqun Feng To: Benno Lossin Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, lkmm@lists.linux.dev, linux-arch@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Will Deacon , Peter Zijlstra , Mark Rutland , Wedson Almeida Filho , Viresh Kumar , Lyude Paul , Ingo Molnar , Mitchell Levy , "Paul E. McKenney" , Greg Kroah-Hartman , Linus Torvalds , Thomas Gleixner , Alan Stern Subject: Re: [PATCH v7 2/9] rust: sync: Add basic atomic operation mapping framework Message-ID: References: <20250714053656.66712-1-boqun.feng@gmail.com> <20250714053656.66712-3-boqun.feng@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: On Mon, Jul 14, 2025 at 05:00:56PM +0200, Benno Lossin wrote: > On Mon Jul 14, 2025 at 3:42 PM CEST, Boqun Feng wrote: > > On Mon, Jul 14, 2025 at 12:03:11PM +0200, Benno Lossin wrote: > > [...] > >> > +declare_and_impl_atomic_methods!( > >> > + /// Basic atomic operations > >> > + pub trait AtomicHasBasicOps { > >> > >> I think we should drop the `Has` from the names. So this one can just be > >> `AtomicBasicOps`. Or how about `BasicAtomic`, or `AtomicBase`? > >> > > > > Actually, given your feedback to `ordering::Any` vs `core::any::Any`, > > I think it makes more sense to keep the current names ;-) These are only > > trait names to describe what operations do an `AtomicImpl` has, and they > > should be used only in atomic mod, so naming them a bit longer is not a > > problem. And by doing so, we free the better names `BasicAtomic` or > > `AtomicBase` for other future usages. > > > > Best I could do is `AtomicBasicOps` or `HasAtomicBasicOps`. > > But you are already in the `ops` namespace, so by your argument you > could just use `ops::BasicAtomic` :) > > I'm fine with `AtomicBasicOps`. > > >> > +declare_and_impl_atomic_methods!( > >> > + /// Atomic arithmetic operations > >> > + pub trait AtomicHasArithmeticOps { > >> > >> Forgot to rename this one to `Add`? I think `AtomicAdd` sounds best for > > > > No, because at the `AtomicImpl` level, it's easy to know whether a type > > has all the arithmetic operations or none (also the `Delta` type should > > be known). But I don't have opinions on renaming it to `AtomicAddOps` or > > `HasAtomicAddOps`. > > Ahh right yeah this makes sense. So let's use `AtomicArithmeticOps` if > you insist on the `Ops` part. > Done with AtomicBasicOps AtomicExchangeOps and AtomicArithmeticOps ;-) Thank you! Regards, Boqun > --- > Cheers, > Benno