mirror-linux/kernel/time
Peter Zijlstra a43b4856bc hrtimer: Prepare stubs for deferred rearming
The hrtimer interrupt expires timers and at the end of the interrupt it
rearms the clockevent device for the next expiring timer.

That's obviously correct, but in the case that a expired timer set
NEED_RESCHED the return from interrupt ends up in schedule(). If HRTICK is
enabled then schedule() will modify the hrtick timer, which causes another
reprogramming of the hardware.

That can be avoided by deferring the rearming to the return from interrupt
path and if the return results in a immediate schedule() invocation then it
can be deferred until the end of schedule().

To make this correct the affected code parts need to be made aware of this.

Provide empty stubs for the deferred rearming mechanism, so that the
relevant code changes for entry, softirq and scheduler can be split up into
separate changes independent of the actual enablement in the hrtimer code.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260224163431.000891171@kernel.org
2026-02-27 16:40:13 +01:00
..
Kconfig hrtimer: Prepare stubs for deferred rearming 2026-02-27 16:40:13 +01:00
Makefile time: Build generic update_vsyscall() only with generic time vDSO 2025-09-04 11:23:50 +02:00
alarmtimer.c time: Fix spelling mistakes in comments 2025-09-21 10:02:02 +02:00
clockevents.c clockevents: Provide support for clocksource coupled comparators 2026-02-27 16:40:08 +01:00
clocksource-wdtest.c clocksource/wdtest: Print time values for short udelay(1) 2025-01-15 19:49:13 +01:00
clocksource.c clocksource: Reduce watchdog readout delay limit to prevent false positives 2026-01-21 11:33:11 +01:00
hrtimer.c hrtimer: Rename hrtimer_cpu_base::in_hrtirq to deferred_rearm 2026-02-27 16:40:12 +01:00
itimer.c timers/itimer: Avoid direct access to hrtimer clockbase 2025-09-09 12:27:17 +02:00
jiffies.c sysctl: replace SYSCTL_INT_CONV_CUSTOM macro with functions 2026-01-06 11:27:10 +01:00
namespace.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
ntp.c ntp: Use ktime_get_ntp_seconds() 2025-06-19 14:28:24 +02:00
ntp_internal.h ntp: Rename __do_adjtimex() to ntp_adjtimex() 2025-06-19 14:28:23 +02:00
posix-clock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
posix-cpu-timers.c hrtimer: Store time as ktime_t in restart block 2025-11-14 16:31:19 +01:00
posix-stubs.c
posix-timers.c compiler-context-analysis: Remove __cond_lock() function-like helper 2026-01-05 16:43:33 +01:00
posix-timers.h timekeeping: Add minimal posix-timers support for auxiliary clocks 2025-06-27 20:13:12 +02:00
sched_clock.c time/sched_clock: Use ACCESS_PRIVATE() to evaluate hrtimer::function 2026-01-13 18:08:57 +01:00
sleep_timeout.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
test_udelay.c
tick-broadcast-hrtimer.c clockevents: Remove redundant CLOCK_EVT_FEAT_KTIME 2026-02-27 16:40:06 +01:00
tick-broadcast.c treewide: Update email address 2026-01-11 06:09:11 -10:00
tick-common.c treewide: Update email address 2026-01-11 06:09:11 -10:00
tick-internal.h cpufreq: ondemand: Simplify idle cputime granularity test 2026-01-28 22:24:58 +01:00
tick-legacy.c
tick-oneshot.c treewide: Update email address 2026-01-11 06:09:11 -10:00
tick-sched.c tick/sched: Avoid hrtimer_cancel/start() sequence 2026-02-27 16:40:06 +01:00
tick-sched.h
time.c time: export timespec64_add_safe() symbol 2025-09-03 16:51:08 -07:00
time_test.c time/kunit: Document handling of negative years of is_leap() 2026-02-02 12:37:54 +01:00
timeconst.bc
timeconv.c
timecounter.c time/timecounter: Inline timecounter_cyc2time() 2025-12-15 20:16:49 +01:00
timekeeping.c timekeeping: Provide infrastructure for coupled clockevents 2026-02-27 16:40:08 +01:00
timekeeping.h timekeeping: Provide infrastructure for coupled clockevents 2026-02-27 16:40:08 +01:00
timekeeping_debug.c timekeeping: Add percpu counter for tracking floor swap events 2024-10-10 10:20:46 +02:00
timekeeping_internal.h timekeeping: Provide ktime_get_ntp_seconds() 2025-06-19 14:28:23 +02:00
timer.c cpufreq: ondemand: Simplify idle cputime granularity test 2026-01-28 22:24:58 +01:00
timer_list.c hrtimer: Convert state and properties to boolean 2026-02-27 16:40:11 +01:00
timer_migration.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
timer_migration.h timers/migration: Rename 'online' bit to 'available' 2025-11-20 20:17:31 +01:00
vsyscall.c vdso/vsyscall: Avoid slow division loop in auxiliary clock update 2025-09-03 11:55:11 +02:00