timers: Make internal_add_timer() update ->next_timer if ->active_timers == 0
authorOleg Nesterov <oleg@redhat.com>
Thu, 16 Jan 2014 00:19:27 +0000 (16:19 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 25 Feb 2014 20:39:01 +0000 (12:39 -0800)
commitaea369b959bef10d235cd0714789cd8b0fe170b8
tree61d445c4986184e5f041c2c3f88896b02aa8f54b
parent18d8cb64c9c074cbe2bd677ab10fff8283abdb62
timers: Make internal_add_timer() update ->next_timer if ->active_timers == 0

The internal_add_timer() function updates base->next_timer only if
timer->expires < base->next_timer. This is correct, but it also makes
sense to do the same if we add the first non-deferrable timer.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Mike Galbraith <bitbucket@online.de>
kernel/timer.c