Taken straight from a tglx email ;)
Showing the changes to kernel/time (1 of 1 file). Show all
Unified · Split
| @@ -33,6 +33,21 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device); · 32 unmodified lines | ||
| 33 | 33 | */ |
| 34 | 34 | ktime_t tick_next_period; |
| 35 | 35 | ktime_t tick_period; |
| 36 | + | |
| 37 | +/* | |
| 38 | + * tick_do_timer_cpu is a timer core internal variable which holds the CPU NR | |
| 39 | + * which is responsible for calling do_timer(), i.e. the timekeeping stuff. This | |
| 40 | + * variable has two functions: | |
| 41 | + * | |
| 42 | + * 1) Prevent a thundering herd issue of a gazillion of CPUs trying to grab the | |
| 43 | + * timekeeping lock all at once. Only the CPU which is assigned to do the | |
| 44 | + * update is handling it. | |
| 45 | + * | |
| 46 | + * 2) Hand off the duty in the NOHZ idle case by setting the value to | |
| 47 | + * TICK_DO_TIMER_NONE, i.e. a non existing CPU. So the next cpu which looks | |
| 48 | + * at it will take over and keep the time keeping alive. The handover | |
| 49 | + * procedure also covers cpu hotplug. | |
| 50 | + */ | |
| 36 | 51 | int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT; |
| 37 | 52 | |
| 38 | 53 | /* |