Loading kernel/timer.c +8 −14 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include <asm/timex.h> #include <asm/io.h> #include "time/tick-internal.h" #define CREATE_TRACE_POINTS #include <trace/events/timer.h> Loading Loading @@ -1154,20 +1156,15 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), /** * __run_timers - run all expired timers (if any) on this CPU. * @base: the timer vector to be processed. * @try: try and just return if base's lock already acquired. * * This function cascades all vectors and executes all expired timer * vectors. */ static inline void __run_timers(struct tvec_base *base, bool try) static inline void __run_timers(struct tvec_base *base) { struct timer_list *timer; if (!try) spin_lock_irq(&base->lock); else if (!spin_trylock_irq(&base->lock)) return; while (time_after_eq(jiffies, base->timer_jiffies)) { struct list_head work_list; struct list_head *head = &work_list; Loading Loading @@ -1395,16 +1392,13 @@ static void run_timer_softirq(struct softirq_action *h) hrtimer_run_pending(); #ifdef CONFIG_SMP if (time_after_eq(jiffies, tvec_base_deferral->timer_jiffies)) /* * if other cpu is handling cpu unbound deferrable timer base, * current cpu doesn't need to handle it so pass try=true. */ __run_timers(tvec_base_deferral, true); if (smp_processor_id() == tick_do_timer_cpu && time_after_eq(jiffies, tvec_base_deferral->timer_jiffies)) __run_timers(tvec_base_deferral); #endif if (time_after_eq(jiffies, base->timer_jiffies)) __run_timers(base, false); __run_timers(base); } /* Loading Loading
kernel/timer.c +8 −14 Original line number Diff line number Diff line Loading @@ -49,6 +49,8 @@ #include <asm/timex.h> #include <asm/io.h> #include "time/tick-internal.h" #define CREATE_TRACE_POINTS #include <trace/events/timer.h> Loading Loading @@ -1154,20 +1156,15 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), /** * __run_timers - run all expired timers (if any) on this CPU. * @base: the timer vector to be processed. * @try: try and just return if base's lock already acquired. * * This function cascades all vectors and executes all expired timer * vectors. */ static inline void __run_timers(struct tvec_base *base, bool try) static inline void __run_timers(struct tvec_base *base) { struct timer_list *timer; if (!try) spin_lock_irq(&base->lock); else if (!spin_trylock_irq(&base->lock)) return; while (time_after_eq(jiffies, base->timer_jiffies)) { struct list_head work_list; struct list_head *head = &work_list; Loading Loading @@ -1395,16 +1392,13 @@ static void run_timer_softirq(struct softirq_action *h) hrtimer_run_pending(); #ifdef CONFIG_SMP if (time_after_eq(jiffies, tvec_base_deferral->timer_jiffies)) /* * if other cpu is handling cpu unbound deferrable timer base, * current cpu doesn't need to handle it so pass try=true. */ __run_timers(tvec_base_deferral, true); if (smp_processor_id() == tick_do_timer_cpu && time_after_eq(jiffies, tvec_base_deferral->timer_jiffies)) __run_timers(tvec_base_deferral); #endif if (time_after_eq(jiffies, base->timer_jiffies)) __run_timers(base, false); __run_timers(base); } /* Loading