[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72nAq1=xpAc=pi_N04spNWdKssJb8Nk5x9KaGHc+JhNAmg@mail.gmail.com>
Date: Thu, 17 Jul 2025 02:05:14 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Lyude Paul <lyude@...hat.com>
Cc: rust-for-linux@...r.kernel.org,
FUJITA Tomonori <fujita.tomonori@...il.com>, Andreas Hindborg <a.hindborg@...nel.org>,
Boqun Feng <boqun.feng@...il.com>, Frederic Weisbecker <frederic@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, Anna-Maria Behnsen <anna-maria@...utronix.de>,
John Stultz <jstultz@...gle.com>, Stephen Boyd <sboyd@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rust: time: Pass correct timer mode ID to hrtimer_start_range_ns
On Fri, Jul 11, 2025 at 12:51 AM Lyude Paul <lyude@...hat.com> wrote:
>
> While rebasing rvkms I noticed that timers I was setting seemed to have
> pretty random timer values that amounted slightly over 2x the time value I
> set each time. After a lot of debugging, I finally managed to figure out
> why: it seems that since we moved to Instant and Delta, we mistakenly
> began passing the clocksource ID to hrtimer_start_range_ns, when we should
> be passing the timer mode instead. Presumably, this works fine for simple
> relative timers - but immediately breaks on other types of timers.
>
> So, fix this by passing the ID for the timer mode instead.
>
> Signed-off-by: Lyude Paul <lyude@...hat.com>
> Cc: FUJITA Tomonori <fujita.tomonori@...il.com>
> Fixes: fcc1dd8c8656 ("rust: time: Make HasHrTimer generic over HrTimerMode")
Applied to `rust-next` (on top of the timekeeping merge) -- thanks everyone!
[ Removed cast, applied `rustfmt`, fixed `Fixes:` tag. - Miguel ]
I assume the cast was there just because the original line (`Clock::ID`) had it.
Cheers,
Miguel
Powered by blists - more mailing lists