]> git.karo-electronics.de Git - linux-beck.git/commit
hrtimer: Keep pointer to first timer and simplify __remove_hrtimer()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 14 Apr 2015 21:08:49 +0000 (21:08 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 22 Apr 2015 15:06:50 +0000 (17:06 +0200)
commit895bdfa793f6e912d1a58fc445b3dd4d686f7bd3
treedf602d9bb8097eb9cd0bd6f98addc9b5f5cd333d
parentb97f44c9b658d52e0139c947ea5519e51ba38d81
hrtimer: Keep pointer to first timer and simplify __remove_hrtimer()

__remove_hrtimer() needs to evaluate the expiry time to figure out
whether the timer which is removed is eventually the first expiring
timer on the cpu. Keep a pointer to it, which is lazily updated, so we
can avoid the evaluation dance and retrieve the information from there.

Generates slightly better code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/20150414203501.752838019@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/hrtimer.h
kernel/time/hrtimer.c