All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <jstultz@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH] timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex()
Date: Mon, 05 Aug 2024 20:30:06 +0200	[thread overview]
Message-ID: <874j7y6cwh.ffs@tglx> (raw)
In-Reply-To: <CANDhNCpej847tOsbnDFBLV6GLdPGDoM5JJ7d1-UYed+2AEarVQ@mail.gmail.com>

On Mon, Aug 05 2024 at 10:50, John Stultz wrote:
> On Sat, Aug 3, 2024 at 8:07 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>>
>> The addition of the bases argument to clock_was_set() fixed up all call
>> sites correctly except for do_adjtimex(). This uses CLOCK_REALTIME
>> instead of CLOCK_SET_WALL as argument. CLOCK_REALTIME is 0.
>>
>> As a result the effect of that clock_was_set() notification is incomplete
>> and might result in timers expiring late because the hrtimer code does
>> not re-evaluate the affected clock bases.
>>
>> Use CLOCK_SET_WALL instead of CLOCK_REALTIME to tell the hrtimers code
>> which clock bases need to be re-evaluated.
>
> Acked-by: John Stultz <jstultz@google.com>
>
> My only thought here is maybe renaming CLOCK_SET_WALL and
> CLOCK_SET_BOOT to something like:
>   BASEMASK_WALL_CLOCK_SET and BASEMASK_BOOT_CLOCK_SET
>
> Just to avoid future naming mixups or confusion with clockids?

Makes sense. Care to whip up a patch?

Thanks,

        tglx

  reply	other threads:[~2024-08-05 18:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-03 15:07 [PATCH] timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() Thomas Gleixner
2024-08-05 14:22 ` [tip: timers/urgent] " tip-bot2 for Thomas Gleixner
2024-08-05 17:50 ` [PATCH] " John Stultz
2024-08-05 18:30   ` Thomas Gleixner [this message]
2024-08-15 20:03     ` [PATCH] time: Rename CLOCK_SET_* as BASEMASK_*_CLOCK_SET John Stultz
2024-09-02 15:45       ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2024-08-03 15:06 [PATCH] timekeeping: Fix bogus clock_was_set() invocation in do_adjtimex() Thomas Gleixner
2024-08-03 15:05 Thomas Gleixner

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=874j7y6cwh.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.