October 2017
Intermediate to advanced
354 pages
9h 28m
English
Software timers are complex and time consuming, and therefore should not be handled by the timer ISR. Rather they should be performed by a deferrable bottom-half softirq routine called TIMER_SOFTIRQ , and its routine is defined in kernel/time/timer.c:
static __latent_entropy void run_timer_softirq(struct softirq_action *h) { struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); base->must_forward_clk = false; __run_timers(base); if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active) __run_timers(this_cpu_ptr(&timer_bases[BASE_DEF])); }