From nobody Thu Apr 9 09:36:59 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 661C3411615; Mon, 9 Mar 2026 19:48:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773085709; cv=none; b=boDc+SW2xvHh9nWizzNtYl9h6l9YZu6ZPIFpdh2Z4CLf2Z/77HPeqHjf9Wy25ElPf1YpaWmQfMPdCktTI7zYtfSxVMbvSlOk2OGmPl4WNwZSYy2E295mZ8X5AKU0k8cn7N5F3PR9YQqVrup5yD64TIbM0cM0OyvwQaVCW653rJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773085709; c=relaxed/simple; bh=tq8xDAWKiXfbkgwoGeSk1WsJuQymoYFNNjPMfLVsOLQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=cVvJuAotS/xyguL5HccCNqWERhB3rH17g40FZ4vdgbuur8VO3ee00fzui73htVqJ7rsjVehsM1m0mxc0bV7jE6ixoPnzbSVZ3gi8NoLnFM/gb0eyxCsIVYgmMLvOvaGUkKkHYoQd5OiwnwY8u1qQCqlMPzCQz0aSu+YYHWfQYrY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VGgpd9wU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wQNLy0wE; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VGgpd9wU"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wQNLy0wE" Date: Mon, 09 Mar 2026 19:48:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773085706; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mtJNraB9WxV5Wx9rvSAuasvQC5dxf84Z8OfoqT+jPLM=; b=VGgpd9wUWGJXTZ6LWncwMR4eRqXN23vN4Xg/DzQfQ0J2hpiynY49u6TQQpo2H4zk46pejJ GFtnfH2nzXSUSwFipqm/LREO0iKDe7lgyR8OTaEYp0pOTZ9kFxm58q9FfMzoKG/fKoNd9y eC/Ka2wot/2gtKMH2pcbfg9H3ksk8dVFYMmQxYOMCncSrUeKytuO79AKCv6xLN3gXqDT4S 3G/ERIwB7IUbNHJBu/DPe8QBGSAxpXl6jp6puq7vGc7frX2AX++To32PBkM6oBgsu8KGL7 zTUMCM0tKB75RwQ8fn99Z6GA3pak7DUch6rGWGMrKz0ae6976GZ3uSv2+OXk+Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773085706; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mtJNraB9WxV5Wx9rvSAuasvQC5dxf84Z8OfoqT+jPLM=; b=wQNLy0wEfNTx6cDCaEe6f+MnrV2IMzd1ND6UcguwqVuM9WOdWSrXj99SpVQmZpE9Tp6pBN mQoaHPZP8EJqJ7Cg== From: "tip-bot2 for FUJITA Tomonori" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/core] rust: list: Use AtomicFlag in AtomicTracker Cc: FUJITA Tomonori , Boqun Feng , "Peter Zijlstra (Intel)" , Gary Guo , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260303201701.12204-10-boqun@kernel.org> References: <20260303201701.12204-10-boqun@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177308570473.1647592.7085311895626426490.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the locking/core branch of tip: Commit-ID: 282866207020b15c2afc4d43b1ca0c5d96c9032d Gitweb: https://git.kernel.org/tip/282866207020b15c2afc4d43b1ca0c5d9= 6c9032d Author: FUJITA Tomonori AuthorDate: Tue, 03 Mar 2026 12:16:57 -08:00 Committer: Peter Zijlstra CommitterDate: Sun, 08 Mar 2026 11:06:50 +01:00 rust: list: Use AtomicFlag in AtomicTracker Make AtomicTracker use AtomicFlag instead of Atomic to avoid slow byte-sized RMWs on architectures that don't support them. Signed-off-by: FUJITA Tomonori Signed-off-by: Boqun Feng Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Gary Guo Link: https://patch.msgid.link/20260129122622.3896144-3-tomo@aliasing.net Link: https://patch.msgid.link/20260303201701.12204-10-boqun@kernel.org --- rust/kernel/list/arc.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/kernel/list/arc.rs b/rust/kernel/list/arc.rs index 2282f33..5e84f50 100644 --- a/rust/kernel/list/arc.rs +++ b/rust/kernel/list/arc.rs @@ -6,7 +6,7 @@ =20 use crate::alloc::{AllocError, Flags}; use crate::prelude::*; -use crate::sync::atomic::{ordering, Atomic}; +use crate::sync::atomic::{ordering, AtomicFlag}; use crate::sync::{Arc, ArcBorrow, UniqueArc}; use core::marker::PhantomPinned; use core::ops::Deref; @@ -469,7 +469,7 @@ where /// If the boolean is `false`, then there is no [`ListArc`] for this value. #[repr(transparent)] pub struct AtomicTracker { - inner: Atomic, + inner: AtomicFlag, // This value needs to be pinned to justify the INVARIANT: comment in = `AtomicTracker::new`. _pin: PhantomPinned, } @@ -480,12 +480,12 @@ impl AtomicTracker { // INVARIANT: Pin-init initializers can't be used on an existing `= Arc`, so this value will // not be constructed in an `Arc` that already has a `ListArc`. Self { - inner: Atomic::new(false), + inner: AtomicFlag::new(false), _pin: PhantomPinned, } } =20 - fn project_inner(self: Pin<&mut Self>) -> &mut Atomic { + fn project_inner(self: Pin<&mut Self>) -> &mut AtomicFlag { // SAFETY: The `inner` field is not structurally pinned, so we may= obtain a mutable // reference to it even if we only have a pinned reference to `sel= f`. unsafe { &mut Pin::into_inner_unchecked(self).inner }