From: "tip-bot2 for Yury Norov [NVIDIA]" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Yury Norov [NVIDIA]" <yury.norov@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <jstultz@google.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource: Use cpumask_next_wrap() in clocksource_watchdog()
Date: Sat, 14 Jun 2025 18:16:05 -0000 [thread overview]
Message-ID: <174992496575.406.1572877544071692301.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250614155031.340988-3-yury.norov@gmail.com>
The following commit has been merged into the timers/core branch of tip:
Commit-ID: bfa788dc2ddaea7d7930f63a5c7c8f3668a3f2c5
Gitweb: https://git.kernel.org/tip/bfa788dc2ddaea7d7930f63a5c7c8f3668a3f2c5
Author: Yury Norov [NVIDIA] <yury.norov@gmail.com>
AuthorDate: Sat, 14 Jun 2025 11:50:30 -04:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Sat, 14 Jun 2025 20:09:44 +02:00
clocksource: Use cpumask_next_wrap() in clocksource_watchdog()
cpumask_next_wrap() is more verbose and efficient comparing to
cpumask_next() followed by cpumask_first().
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/all/20250614155031.340988-3-yury.norov@gmail.com
---
kernel/time/clocksource.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index a2f2e9f..e400fe1 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -587,9 +587,7 @@ static void clocksource_watchdog(struct timer_list *unused)
* Cycle through CPUs to check if the CPUs stay synchronized
* to each other.
*/
- next_cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask);
- if (next_cpu >= nr_cpu_ids)
- next_cpu = cpumask_first(cpu_online_mask);
+ next_cpu = cpumask_next_wrap(raw_smp_processor_id(), cpu_online_mask);
/*
* Arm timer if not already pending: could race with concurrent
next prev parent reply other threads:[~2025-06-14 18:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-14 15:50 [PATCH RESEND 0/2] clocksource: Use better cpumask API where appropriate Yury Norov
2025-06-14 15:50 ` [PATCH 1/2] clocksource: Use cpumask_any_but() in clocksource_verify_choose_cpus() Yury Norov
2025-06-14 18:16 ` [tip: timers/core] " tip-bot2 for Yury Norov [NVIDIA]
2025-06-14 15:50 ` [PATCH 2/2] clocksource: Use cpumask_next_wrap() in clocksource_watchdog() Yury Norov
2025-06-14 18:16 ` tip-bot2 for Yury Norov [NVIDIA] [this message]
2025-06-14 18:07 ` [PATCH RESEND 0/2] clocksource: Use better cpumask API where appropriate 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=174992496575.406.1572877544071692301.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yury.norov@gmail.com \
/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®