History

tick: Document tick_do_timer_cpu

Taken straight from a tglx email ;)

Andrew Morton committed 13 years ago

Commit 050ded11 parent da554eb1 file · +15 −0Browse files

Showing the changes to kernel/time (1 of 1 file). Show all

Unified · Split

kernel/time/tick-common.c+15−0
@@ -33,6 +33,21 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device); · 32 unmodified lines
33 */33 */
34ktime_t tick_next_period;34ktime_t tick_next_period;
35ktime_t tick_period;35ktime_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 */
36int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT;51int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT;
37 52
38/*53/*

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t