From: Thomas Gleixner <tglx@kernel.org>
To: Andrea Parri <parri.andrea@gmail.com>,
Anna-Maria Behnsen <anna-maria@linutronix.de>,
Frederic Weisbecker <frederic@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Andrea Parri <parri.andrea@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] hrtimer: Use hard expiry when updating timers on the same base
Date: Wed, 09 Sep 2026 18:03:38 +0200 [thread overview]
Message-ID: <87v78eza1x.ffs@fw13> (raw)
In-Reply-To: <20260909102749.7677-1-parri.andrea@gmail.com>
On Wed, Sep 09 2026 at 12:27, Andrea Parri wrote:
> @@ -1263,13 +1263,16 @@ remove_and_enqueue_same_base(struct hrtimer *timer, struct hrtimer_clock_base *b
> {
> bool was_first = false;
>
> + /* Set the new expiry time */
> + hrtimer_set_expires_range_ns(timer, expires, delta_ns);
> + expires = hrtimer_get_expires(timer);
My knee jerk reaction when reading this the first time was something
non-printable because the obvious rule is that you can't change the sort
key of a tree entry when that can make the tree inconsistent.
As the base lock is held and nothing can observe the potentially
resulting inconsistency at that point and the timer either stays in
place or is dequeued, this is safe, but non obvious.
So this really wants to have a big fat comment explaining why this is
safe to do.
Thanks,
tglx
next prev parent reply other threads:[~2026-09-09 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 10:27 Andrea Parri
2026-09-09 16:03 ` Thomas Gleixner [this message]
2026-09-10 7:21 ` Andrea Parri
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=87v78eza1x.ffs@fw13 \
--to=tglx@kernel.org \
--cc=anna-maria@linutronix.de \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=parri.andrea@gmail.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
/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®