From: Zhan Xusheng <zhanxusheng1024@gmail.com>
To: Thomas Gleixner <tglx@kernel.org>
Cc: linux-kernel@vger.kernel.org, Zhan Xusheng <zhanxusheng@xiaomi.com>
Subject: [PATCH] clockevents: Reset next_event_forced in the coupled programming path
Date: Mon, 27 Apr 2026 17:28:24 +0800 [thread overview]
Message-ID: <20260427092824.48335-1-zhanxusheng@xiaomi.com> (raw)
All successful event programming paths in clockevents_program_event()
reset next_event_forced to zero, except the clockevent_set_next_coupled()
path which was added before the starvation prevention mechanism.
Add the missing reset for consistency.
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
---
kernel/time/clockevents.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 5e22697b098d..ee1a350b9b43 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -357,8 +357,10 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, b
if (unlikely(dev->features & CLOCK_EVT_FEAT_HRTIMER))
return dev->set_next_ktime(expires, dev);
- if (likely(clockevent_set_next_coupled(dev, expires)))
+ if (likely(clockevent_set_next_coupled(dev, expires))) {
+ dev->next_event_forced = 0;
return 0;
+ }
delta = ktime_to_ns(ktime_sub(expires, ktime_get()));
--
2.43.0
next reply other threads:[~2026-04-27 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 9:28 Zhan Xusheng [this message]
2026-04-27 15:08 ` Thomas Gleixner
2026-04-28 2:23 ` Zhan Xusheng
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=20260427092824.48335-1-zhanxusheng@xiaomi.com \
--to=zhanxusheng1024@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=zhanxusheng@xiaomi.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®