itimers: Fix periodic tics precision
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 29 Jul 2009 10:15:27 +0000 (12:15 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 3 Aug 2009 12:48:35 +0000 (14:48 +0200)
commit8356b5f9c424e5831715abbce747197c30d1fd71
tree87de74cc86f6eebf88eba9a4c335614787d984c5
parent42c4ab41a176ee784c0f28c0b29025a8fc34f05a
itimers: Fix periodic tics precision

Measure ITIMER_PROF and ITIMER_VIRT timers interval error
between real ticks and requested by user. Take it into account
when scheduling next tick.

This patch introduce possibility where time between two
consecutive tics is smaller then requested interval, it
preserve however dependency that n tick is generated not
earlier than n*interval time - counting from the beginning of
periodic signal generation.

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-3-git-send-email-sgruszka@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/sched.h
kernel/itimer.c
kernel/posix-cpu-timers.c