linux/kernel/time
Thomas Gleixner 6441402b1f clockevents: prevent cpu online to interfere with nohz
Impact: rare hang which can be triggered on CPU online.

tick_do_timer_cpu keeps track of the CPU which updates jiffies
via do_timer. The value -1 is used to signal, that currently no
CPU is doing this. There are two cases, where the variable can 
have this state:

 boot:
    necessary for systems where the boot cpu id can be != 0

 nohz long idle sleep:
    When the CPU which did the jiffies update last goes into
    a long idle sleep it drops the update jiffies duty so
    another CPU which is not idle can pick it up and keep
    jiffies going.

Using the same value for both situations is wrong, as the CPU online
code can see the -1 state when the timer of the newly onlined CPU is
setup. The setup for a newly onlined CPU goes through periodic mode
and can pick up the do_timer duty without being aware of the nohz /
highres mode of the already running system.

Use two separate states and make them constants to avoid magic
numbers confusion. 

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-09-23 11:38:52 +02:00
..
clockevents.c clockevents: make device shutdown robust 2008-09-16 13:47:02 -07:00
clocksource.c
jiffies.c
Kconfig
Makefile
ntp.c ntp: fix calculation of the next jiffie to trigger RTC sync 2008-09-06 15:31:48 +02:00
tick-broadcast.c clockevents: make device shutdown robust 2008-09-16 13:47:02 -07:00
tick-common.c clockevents: prevent cpu online to interfere with nohz 2008-09-23 11:38:52 +02:00
tick-internal.h clockevents: prevent cpu online to interfere with nohz 2008-09-23 11:38:52 +02:00
tick-oneshot.c clockevents: remove WARN_ON which was used to gather information 2008-09-09 22:20:01 +02:00
tick-sched.c clockevents: prevent cpu online to interfere with nohz 2008-09-23 11:38:52 +02:00
timekeeping.c
timer_list.c
timer_stats.c