mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "Boqun Feng" <boqun@kernel.org>,
	"FUJITA Tomonori" <fujita.tomonori@gmail.com>,
	"Frederic Weisbecker" <frederic@kernel.org>,
	"Lyude Paul" <lyude@redhat.com>,
	"Thomas Gleixner" <tglx@kernel.org>,
	"Anna-Maria Behnsen" <anna-maria@linutronix.de>,
	"John Stultz" <jstultz@google.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>
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
Date: Mon, 30 Nov 2026 17:11:53 +0100	[thread overview]
Message-ID: <87pkvms3hy.fsf@t14s.mail-host-address-is-not-set> (raw)
In-Reply-To: <179563484867.2957046.15537503235539912242.b4-ty@b4>

Andreas Hindborg <a.hindborg@kernel.org> 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



      reply	other threads:[~2026-11-30 16:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 12:34 Andreas Hindborg
2026-11-25 14:29 ` Gary Guo
2026-11-25 19:27 ` Andreas Hindborg
2026-11-30 16:11   ` Andreas Hindborg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pkvms3hy.fsf@t14s.mail-host-address-is-not-set \
    --to=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=anna-maria@linutronix.de \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=frederic@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tamird@kernel.org \
    --cc=tglx@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®