lkml.org 
[lkml]   [2017]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch V2 06/10] timer: Restructure internal locking
On Tue, Apr 18, 2017 at 01:11:08PM +0200, Thomas Gleixner wrote:

> +++ b/kernel/time/timer.c
> @@ -1651,17 +1651,14 @@ void update_process_times(int user_tick)
> /**
> * __run_timers - run all expired timers (if any) on this CPU.
> * @base: the timer vector to be processed.
> + *
> + * Caller must hold the base lock.
> */
> static inline void __run_timers(struct timer_base *base)
> {
> struct hlist_head heads[LVL_DEPTH];
> int levels;
>
> - if (!time_after_eq(jiffies, base->clk))
> - return;
> -
> - spin_lock_irq(&base->lock);
> -

lockdep_assert_held(&base->lock);


Is so ever much more useful than a comment.

> while (time_after_eq(jiffies, base->clk)) {
>
> levels = collect_expired_timers(base, heads);

\
 
 \ /
  Last update: 2017-04-19 09:08    [W:0.370 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site