Skip to content

Commit 07454bf

Browse files
committed
clockevents: check broadcast tick device not the clock events device
Impact: jiffies increment too fast. Hugh Dickins noted that with NOHZ=n and HIGHRES=n jiffies get incremented too fast. The reason is a wrong check in the broadcast enter/exit code, which keeps the local apic timer in periodic mode when the switch happens. Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 2165f63 commit 07454bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/time/tick-broadcast.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,8 @@ static void tick_do_broadcast_on_off(void *why)
235235
case CLOCK_EVT_NOTIFY_BROADCAST_FORCE:
236236
if (!cpu_isset(cpu, tick_broadcast_mask)) {
237237
cpu_set(cpu, tick_broadcast_mask);
238-
if (bc->mode == TICKDEV_MODE_PERIODIC)
238+
if (tick_broadcast_device.mode ==
239+
TICKDEV_MODE_PERIODIC)
239240
clockevents_shutdown(dev);
240241
}
241242
if (*reason == CLOCK_EVT_NOTIFY_BROADCAST_FORCE)
@@ -245,7 +246,8 @@ static void tick_do_broadcast_on_off(void *why)
245246
if (!tick_broadcast_force &&
246247
cpu_isset(cpu, tick_broadcast_mask)) {
247248
cpu_clear(cpu, tick_broadcast_mask);
248-
if (bc->mode == TICKDEV_MODE_PERIODIC)
249+
if (tick_broadcast_device.mode ==
250+
TICKDEV_MODE_PERIODIC)
249251
tick_setup_periodic(dev, 0);
250252
}
251253
break;

0 commit comments

Comments
 (0)