[PATCH v2 3/4] tick/nohz: Remove tick_nohz_idle_restart_tick()
From: Marco Crivellari
Date: Wed Nov 11 2026 - 06:49:56 EST
Polling idle now leaves dynticks idle through tick_nohz_idle_exit()
before cpu_idle_poll(), which restarts the tick where needed.
tick_nohz_idle_restart_tick() has no users left: remove it.
Cc: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxx>
Suggested-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
Signed-off-by: Marco Crivellari <marco.crivellari@xxxxxxxx>
---
include/linux/tick.h | 2 --
kernel/time/tick-sched.c | 17 -----------------
2 files changed, 19 deletions(-)
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 8bfbb053f4fd..686f7e58738b 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -130,7 +130,6 @@ extern bool tick_nohz_tick_stopped(void);
extern bool tick_nohz_tick_stopped_cpu(int cpu);
extern void tick_nohz_idle_stop_tick(void);
extern void tick_nohz_idle_retain_tick(void);
-extern void tick_nohz_idle_restart_tick(void);
extern void tick_nohz_idle_enter(void);
extern void tick_nohz_idle_exit(void);
extern void tick_nohz_irq_exit(void);
@@ -145,7 +144,6 @@ static inline int tick_nohz_tick_stopped(void) { return 0; }
static inline int tick_nohz_tick_stopped_cpu(int cpu) { return 0; }
static inline void tick_nohz_idle_stop_tick(void) { }
static inline void tick_nohz_idle_retain_tick(void) { }
-static inline void tick_nohz_idle_restart_tick(void) { }
static inline void tick_nohz_idle_enter(void) { }
static inline void tick_nohz_idle_exit(void) { }
static inline bool tick_nohz_idle_got_tick(void) { return false; }
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 0b798dc39511..ed4a02881653 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1374,23 +1374,6 @@ static void tick_nohz_dyntick_stop(struct tick_sched *ts, ktime_t now)
kcpustat_dyntick_stop(now, ts->last_tick - TICK_NSEC);
}
-void tick_nohz_idle_restart_tick(void)
-{
- struct tick_sched *ts = this_cpu_ptr(&tick_cpu_sched);
-
- if (tick_sched_flag_test(ts, TS_FLAG_STOPPED)) {
- /*
- * Update entrytime here in case the tick restart is due to temporary
- * polling on forced broadcast. The tick may be stopped again later within
- * the same idle trip. The idle_entrytime was updated recently but make sure
- * no tiny amount of idle time is accounted twice.
- */
- ts->idle_entrytime = ktime_get();
- tick_nohz_dyntick_stop(ts, ts->idle_entrytime);
- tick_nohz_restart_sched_tick(ts, ts->idle_entrytime);
- }
-}
-
static void tick_nohz_idle_update_tick(struct tick_sched *ts, ktime_t now)
{
if (tick_nohz_full_cpu(smp_processor_id()))
--
2.56.0