Skip to content

Commit f04e512

Browse files
Frederic WeisbeckerKAGA-KOKO
authored andcommitted
tick: Move tick cancellation up to CPUHP_AP_TICK_DYING
The tick hrtimer is cancelled right before hrtimers are migrated. This is done from the hrtimer subsystem even though it shouldn't know about its actual users. Move instead the tick hrtimer cancellation to the relevant CPU hotplug state that aims at centralizing high level tick shutdown operations so that the related flow is easy to follow. Signed-off-by: Frederic Weisbecker <frederic@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240225225508.11587-9-frederic@kernel.org
1 parent 3ad6eb0 commit f04e512

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernel/time/hrtimer.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,8 +2229,6 @@ int hrtimers_cpu_dying(unsigned int dying_cpu)
22292229
int i, ncpu = cpumask_any_and(cpu_active_mask, housekeeping_cpumask(HK_TYPE_TIMER));
22302230
struct hrtimer_cpu_base *old_base, *new_base;
22312231

2232-
tick_cancel_sched_timer(dying_cpu);
2233-
22342232
old_base = this_cpu_ptr(&hrtimer_bases);
22352233
new_base = &per_cpu(hrtimer_bases, ncpu);
22362234

kernel/time/tick-common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ int tick_cpu_dying(unsigned int dying_cpu)
410410
if (tick_do_timer_cpu == dying_cpu)
411411
tick_do_timer_cpu = cpumask_first(cpu_online_mask);
412412

413+
tick_cancel_sched_timer(dying_cpu);
414+
413415
return 0;
414416
}
415417

0 commit comments

Comments
 (0)