posix-cpu-timers: Optimize run_posix_cpu_timers()
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 27 Apr 2010 21:12:15 +0000 (14:12 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 10 May 2010 12:24:26 +0000 (14:24 +0200)
commit29f87b793da421a6ab816d991dc8dbf909dfb66a
tree807e95b5f7a41f163000d24f82e85afa96eccdd2
parentdbb6be6d5e974c42bbecd183effaa0df69e1dd8b
posix-cpu-timers: Optimize run_posix_cpu_timers()

We can optimize and simplify things taking into account signal->cputimer
is always running when we have configured any process wide cpu timer.

In check_process_timers(), we don't have to check if new updated value of
signal->cputime_expires is smaller, since we maintain new first expiration
time ({prof,virt,sched}_expires) in code flow and all other writes to
expiration cache are protected by sighand->siglock .

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/posix-cpu-timers.c