Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

alarmtimers: Remove the throttle mechanism from alarm_forward_now()

Now that ignored posix timer signals are requeued and the timers are
rearmed on signal delivery the workaround to keep such timers alive and
self rearm them is not longer required.

Remove the unused alarm timer parts.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20241105064214.252443020@linutronix.de

+3 -27
+3 -27
kernel/time/alarmtimer.c
··· 467 467 } 468 468 EXPORT_SYMBOL_GPL(alarm_forward); 469 469 470 - static u64 __alarm_forward_now(struct alarm *alarm, ktime_t interval, bool throttle) 471 - { 472 - struct alarm_base *base = &alarm_bases[alarm->type]; 473 - ktime_t now = base->get_ktime(); 474 - 475 - if (IS_ENABLED(CONFIG_HIGH_RES_TIMERS) && throttle) { 476 - /* 477 - * Same issue as with posix_timer_fn(). Timers which are 478 - * periodic but the signal is ignored can starve the system 479 - * with a very small interval. The real fix which was 480 - * promised in the context of posix_timer_fn() never 481 - * materialized, but someone should really work on it. 482 - * 483 - * To prevent DOS fake @now to be 1 jiffy out which keeps 484 - * the overrun accounting correct but creates an 485 - * inconsistency vs. timer_gettime(2). 486 - */ 487 - ktime_t kj = NSEC_PER_SEC / HZ; 488 - 489 - if (interval < kj) 490 - now = ktime_add(now, kj); 491 - } 492 - 493 - return alarm_forward(alarm, now, interval); 494 - } 495 - 496 470 u64 alarm_forward_now(struct alarm *alarm, ktime_t interval) 497 471 { 498 - return __alarm_forward_now(alarm, interval, false); 472 + struct alarm_base *base = &alarm_bases[alarm->type]; 473 + 474 + return alarm_forward(alarm, base->get_ktime(), interval); 499 475 } 500 476 EXPORT_SYMBOL_GPL(alarm_forward_now); 501 477