cputime: Optimize jiffies_to_cputime(1)
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 29 Jul 2009 10:15:29 +0000 (12:15 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 3 Aug 2009 12:48:36 +0000 (14:48 +0200)
commita42548a18866e87092db93b771e6c5b060d78401
tree897acf5794920ec9c6fd7f87af63908d0c1988f9
parentd1e3b6d195770bd422e3229b88edfc154b6a27dd
cputime: Optimize jiffies_to_cputime(1)

For powerpc with CONFIG_VIRT_CPU_ACCOUNTING
jiffies_to_cputime(1) is not compile time constant and run time
calculations are quite expensive. To optimize we use
precomputed value. For all other architectures is is
preprocessor definition.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
LKML-Reference: <1248862529-6063-5-git-send-email-sgruszka@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/ia64/include/asm/cputime.h
arch/powerpc/include/asm/cputime.h
arch/powerpc/kernel/time.c
arch/s390/include/asm/cputime.h
include/asm-generic/cputime.h
kernel/itimer.c
kernel/posix-cpu-timers.c
kernel/sched.c