From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796055127; b=5FtVAKNUsq+0wzKmyIKzc7060axGbbGjBQZmDnIvUq+TlNWZpIAFAZp88IZUWhftCr3u iDjNvSYhZGuMety9ZwjVWqkKEoVTJY5ahnSftZwnia47ng+1aZLaQC0P1a/LnvvzdkDYP HAktxM/N9Tro9yxpWrz7OsbUYpZYMx+ouPM+oLZ4LQo3n0uGk8hXlncY5n+qkQW+ZryIW RGbXQZi3/EOoWojIqUidBvecaW/h16T49Xz7LI0ldxcGpt6JXqc1G1Y9qfVYIKfST/sJR XO/bJk+6U6+XjEzcxkCbiPGQudea2662FSdXDSJjaOY7CNkVXXd0D8P4JEs6hw/Ulfg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796055127; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type; bh=mAck9+mZt/yiInFKyxgte9LEHHkkPc8eXIvep00Iqg0=; b=v67w5IMIlGsExbHNCmQKCmju3vZibUWzN02pDWu+37IjOPldvoeazUcoHl/PhCKOMZwf I5wLqr9tqakQBKKtae80JKj9cTavU0fT/ZPQKvTZSyjA03LSISiNaNHw5p79vdK/xflaA bxblTUW42O92zt7J2n/wDANd34rAWpPHT6Z/xGugkqC7xs2KOT7gR6rU16AkrrXv6Mwcl 5/0uFTC1JtlD4RCkUT80MCaD/7/zsQEG9MGpYCP8YhTlGr21j3jsf6j0sdK5A7jKcgYEf oQHRAGgxjnPr/VAveS3LthsqHfotooPbHihySu3xUK3u9dFw/jPnro5GpC3qHbClV6g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FdF1dW9U; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C1D4606A325; Mon, 30 Nov 2026 16:12:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=FdF1dW9U Received: by smtp.kernel.org (Postfix) with ESMTPSA id 722D41F00899; Mon, 30 Nov 2026 16:12:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796055127; bh=mAck9+mZt/yiInFKyxgte9LEHHkkPc8eXIvep00Iqg0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=FdF1dW9UVoLsYJ6bm4//wFXUHLi1lSvOljz5t6k32Qb0Rjv6+Gm5tVKFTNi7sCg/Q ohvdATcYQ6XYYiC9w487ZRrHf5nL6jyK9Qy9F2VasOI/9T70VJJrD2M38Gmc7TT9dR g/OLZdcL0L4wKB29P0AURUt40T5vMrx18R3/o/kTrKJ9JilgrpUKjrh6FgEx8lXkD4 94rrc/62cYGEMQJZH8J9gs9zxEMNcOpKt6GZUeSGcgcsXgFN2mJ91OdGHKtdeE0OMV 7yZ/AC56HFsDmZl+hPY/nGf8viAVc0y3OS9ZoUCccUoJiD+LoRi1748/PCG1D6s1yx wXNADGrWgRvmA== From: Andreas Hindborg To: Boqun Feng , FUJITA Tomonori , Frederic Weisbecker , Lyude Paul , Thomas Gleixner , Anna-Maria Behnsen , John Stultz , Stephen Boyd , Miguel Ojeda , Gary Guo , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , Benno Lossin , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?utf-8?Q?=C3=96zkan?= Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] rust: hrtimer: add active() method to query timer state In-Reply-To: <179563484867.2957046.15537503235539912242.b4-ty@b4> References: <20261125-hrtimer-active-v4-1-415a37b74d67@kernel.org> <179563484867.2957046.15537503235539912242.b4-ty@b4> Date: Mon, 30 Nov 2026 17:11:53 +0100 Message-ID: <87pkvms3hy.fsf@t14s.mail-host-address-is-not-set> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain Andreas Hindborg writes: > On Wed, 25 Nov 2026 13:34:41 +0100, Andreas Hindborg wrote: >> Add an `active()` method to HrTimer that returns true if the timer is in >> the started or running states. This wraps the kernel's hrtimer_active() >> function. >> >> Unlike a direct read of `node.expires`, this does not race with a >> concurrent start operation. hrtimer_active() reads the timer state inside a >> seqcount retry loop and re-reads `timer->base` with READ_ONCE(), and the >> core documents that it must not return a false negative. No exclusive >> access to the timer is therefore required, and the SAFETY comment reflects >> that. >> >> [...] > > Applied, thanks! > > [1/1] rust: hrtimer: add active() method to query timer state > commit: 5c057c3a0b980e0b923211fd49d7bda0e5bf945f > I botched the one above, applied the patch correctly now: Applied, thanks! [1/1] rust: hrtimer: add active() method to query timer state commit: 8ecc26b396a2b587088e8ffd4d4b77d878f1eb33 Best regards, Andreas Hindborg