Re: [patch 01/12] clockevents: Prevent timer interrupt starvation

Thomas Gleixner
2026-04-08T15:18:56Z

On Wed, Apr 08 2026 at 15:55, Thomas Weißschuh wrote:
> On Wed, Apr 08, 2026 at 02:41:20PM +0200, Thomas Weißschuh wrote:
> --- a/kernel/time/clockevents.c
> +++ b/kernel/time/clockevents.c
> @@ -369,7 +369,7 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, b
> if (dev->next_event_forced)
> return 0;
>
> - if (dev->set_next_event(dev->min_delta_ticks, dev)) {
> + if (dev->set_next_event(dev->min_delta_ns, dev)) {

That's wrong as the callback expects cycles (ticks) not nanoseconds.

I've just pushed out an updated version to tip timers/urgent which
addresses a potentially related issue. Delta patch below.

Thanks,

tglx
---
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -324,6 +324,8 @@ int clockevents_program_event(struct clo
return dev->set_next_ktime(expires, dev);

delta = ktime_to_ns(ktime_sub(expires, ktime_get()));
+ if (delta <= 0 && !force)
+ return -ETIME;

if (delta > (int64_t)dev->min_delta_ns) {
delta = min(delta, (int64_t) dev->max_delta_ns);