mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [GIT pull] timers/urgent for v6.11-rc2
Date: Sun,  4 Aug 2024 15:02:58 +0200 (CEST)	[thread overview]
Message-ID: <172277654786.866296.7434610502723586152.tglx@xen13> (raw)
In-Reply-To: <172277654174.866296.10517632866315552419.tglx@xen13>

Linus,

please pull the latest timers/urgent branch from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers-urgent-2024-08-04

up to:  f2655ac2c06a: clocksource: Fix brown-bag boolean thinko in cs_watchdog_read()


Two fixes for the timer/clocksource code:

    - The recent fix for making the take over of the broadcast timer more
      reliable retrieves a per CPU pointer in preemptible context.
      This went unnoticed in testing as some compilers hoist the access into
      the non-preemotible section where the pointer is actually used, but
      obviously compilers can rightfully invoke it where the code put it.

      Move it into the non-preemptible section right to the actual usage
      side to cure it.

    - The clocksource watchdog is supposed to emit a warning when the retry
      count is greater than one and the number of retries reaches the
      limit. The condition is backwards and warns always when the count is
      greater than one. Fixup the condition to prevent spamming dmesg.



Thanks,

	tglx

------------------>
Paul E. McKenney (1):
      clocksource: Fix brown-bag boolean thinko in cs_watchdog_read()

Thomas Gleixner (1):
      tick/broadcast: Move per CPU pointer access into the atomic section


 kernel/time/clocksource.c    | 2 +-
 kernel/time/tick-broadcast.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index d25ba49e313c..d0538a75f4c6 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -246,7 +246,7 @@ static enum wd_read_status cs_watchdog_read(struct clocksource *cs, u64 *csnow,
 
 		wd_delay = cycles_to_nsec_safe(watchdog, *wdnow, wd_end);
 		if (wd_delay <= WATCHDOG_MAX_SKEW) {
-			if (nretries > 1 || nretries >= max_retries) {
+			if (nretries > 1 && nretries >= max_retries) {
 				pr_warn("timekeeping watchdog on CPU%d: %s retried %d times before success\n",
 					smp_processor_id(), watchdog->name, nretries);
 			}
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index b4843099a8da..ed58eebb4e8f 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -1141,7 +1141,6 @@ void tick_broadcast_switch_to_oneshot(void)
 #ifdef CONFIG_HOTPLUG_CPU
 void hotplug_cpu__broadcast_tick_pull(int deadcpu)
 {
-	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
 	struct clock_event_device *bc;
 	unsigned long flags;
 
@@ -1167,6 +1166,8 @@ void hotplug_cpu__broadcast_tick_pull(int deadcpu)
 		 * device to avoid the starvation.
 		 */
 		if (tick_check_broadcast_expired()) {
+			struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
+
 			cpumask_clear_cpu(smp_processor_id(), tick_broadcast_force_mask);
 			tick_program_event(td->evtdev->next_event, 1);
 		}


  parent reply	other threads:[~2024-08-04 13:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-04 13:02 [GIT pull] irq/urgent " Thomas Gleixner
2024-08-04 13:02 ` [GIT pull] locking/urgent " Thomas Gleixner
2024-08-04 16:54   ` pr-tracker-bot
2024-08-04 13:02 ` [GIT pull] perf/urgent " Thomas Gleixner
2024-08-04 16:54   ` pr-tracker-bot
2024-08-04 13:02 ` [GIT pull] sched/urgent " Thomas Gleixner
2024-08-04 16:54   ` pr-tracker-bot
2024-08-04 13:02 ` Thomas Gleixner [this message]
2024-08-04 16:54   ` [GIT pull] timers/urgent " pr-tracker-bot
2024-08-04 13:03 ` [GIT pull] x86/urgent " Thomas Gleixner
2024-08-04 16:54   ` pr-tracker-bot
2024-08-04 16:54 ` [GIT pull] irq/urgent " pr-tracker-bot

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=172277654786.866296.7434610502723586152.tglx@xen13 \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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®