posix-cpu-timers: Reset expire cache when no timer is running
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 11 Mar 2010 22:04:31 +0000 (14:04 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 12 Mar 2010 18:12:18 +0000 (19:12 +0100)
commit15365c108ea27598e265f8c13e7051d99ca5b0b9
tree487cc70e96a3d6696f8f62fb7b6dbaacbc84ace5
parent829b6c1ef488856c6a46a2f705f5068062d5f34c
posix-cpu-timers: Reset expire cache when no timer is running

When a process deletes cpu timer or a timer expires we do not clear
the expiration cache sig->cputimer_expires.

As a result the fastpath_timer_check() which prevents us to loop over
all threads in case no timer is active is not working and we run the
slow path needlessly on every tick.

Zero sig->cputimer_expires in stop_process_timers().

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Spencer Candland <spencer@bluehost.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/posix-cpu-timers.c