]> git.baikalelectronics.ru Git - kernel.git/commit
genirq/timings: Add infrastructure for estimating the next interrupt arrival time
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 23 Jun 2017 14:11:08 +0000 (16:11 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 24 Jun 2017 09:44:39 +0000 (11:44 +0200)
commit7a381adb7a2a88fe158916746999c94181d73dbd
tree28500774c5b8ff667a304d9a74ead820590f85e3
parentdbe9d502f5974d508fdb50636e67121b436180ef
genirq/timings: Add infrastructure for estimating the next interrupt arrival time

An interrupt behaves with a burst of activity with periodic interval of time
followed by one or two peaks of longer interval.

As the time intervals are periodic, statistically speaking they follow a normal
distribution and each interrupts can be tracked individually.

Add a mechanism to compute the statistics on all interrupts, except the
timers which are deterministic from a prediction point of view, as their
expiry time is known.

The goal is to extract the periodicity for each interrupt, with the last
timestamp and sum them, so the next event can be predicted to a certain
extent.

Taking the earliest prediction gives the expected wakeup on the system
(assuming a timer won't expire before).

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: "Rafael J . Wysocki" <rafael@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Link: http://lkml.kernel.org/r/1498227072-5980-2-git-send-email-daniel.lezcano@linaro.org
include/linux/interrupt.h
kernel/irq/internals.h
kernel/irq/timings.c