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.

tick: Remove now unneeded low-res tick stop on CPUHP_AP_TICK_DYING

The generic clockevent layer now detaches and stops the underlying
clockevent from the dying CPU, unifying the tick behaviour for both
periodic and oneshot mode on offline CPUs. There is no more need for
the tick layer to care about that.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241029125451.54574-4-frederic@kernel.org

authored by

Frederic Weisbecker and committed by
Thomas Gleixner
a6347864 3b1596a2

+6 -19
+6 -19
kernel/time/tick-sched.c
··· 311 311 return HRTIMER_RESTART; 312 312 } 313 313 314 - static void tick_sched_timer_cancel(struct tick_sched *ts) 315 - { 316 - if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES)) 317 - hrtimer_cancel(&ts->sched_timer); 318 - else if (tick_sched_flag_test(ts, TS_FLAG_NOHZ)) 319 - tick_program_event(KTIME_MAX, 1); 320 - } 321 - 322 314 #ifdef CONFIG_NO_HZ_FULL 323 315 cpumask_var_t tick_nohz_full_mask; 324 316 EXPORT_SYMBOL_GPL(tick_nohz_full_mask); ··· 1047 1055 * the tick timer. 1048 1056 */ 1049 1057 if (unlikely(expires == KTIME_MAX)) { 1050 - tick_sched_timer_cancel(ts); 1058 + if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES)) 1059 + hrtimer_cancel(&ts->sched_timer); 1060 + else 1061 + tick_program_event(KTIME_MAX, 1); 1051 1062 return; 1052 1063 } 1053 1064 ··· 1599 1604 */ 1600 1605 void tick_sched_timer_dying(int cpu) 1601 1606 { 1602 - struct tick_device *td = &per_cpu(tick_cpu_device, cpu); 1603 1607 struct tick_sched *ts = &per_cpu(tick_cpu_sched, cpu); 1604 - struct clock_event_device *dev = td->evtdev; 1605 1608 ktime_t idle_sleeptime, iowait_sleeptime; 1606 1609 unsigned long idle_calls, idle_sleeps; 1607 1610 1608 1611 /* This must happen before hrtimers are migrated! */ 1609 - tick_sched_timer_cancel(ts); 1610 - 1611 - /* 1612 - * If the clockevents doesn't support CLOCK_EVT_STATE_ONESHOT_STOPPED, 1613 - * make sure not to call low-res tick handler. 1614 - */ 1615 - if (tick_sched_flag_test(ts, TS_FLAG_NOHZ)) 1616 - dev->event_handler = clockevents_handle_noop; 1612 + if (tick_sched_flag_test(ts, TS_FLAG_HIGHRES)) 1613 + hrtimer_cancel(&ts->sched_timer); 1617 1614 1618 1615 idle_sleeptime = ts->idle_sleeptime; 1619 1616 iowait_sleeptime = ts->iowait_sleeptime;