On Tue, Feb 16, 2016 at 5:44 PM, Nicolas Pitre <nicolas.pi...@linaro.org> wrote: > On Tue, 16 Feb 2016, Daniel Lezcano wrote: > >> Many IRQs are quiet most of the time, or they tend to come in bursts of >> fairly equal time intervals within each burst. It is therefore possible >> to detect those IRQs with stable intervals and guestimate when the next >> IRQ event is most likely to happen. >> >> Examples of such IRQs may include audio related IRQs where the FIFO size >> and/or DMA descriptor size with the sample rate create stable intervals, >> block devices during large data transfers, etc. Even network streaming >> of multimedia content creates patterns of periodic network interface IRQs >> in some cases. >> >> This patch adds code to compute the mean interval and variance for each IRQ >> over a window of time intervals between IRQ events. Those statistics can >> be used to assist cpuidle in selecting the most appropriate sleep state >> by predicting the most likely time for the next interrupt. >> >> Signed-off-by: Daniel Lezcano <daniel.lezc...@linaro.org> > > The math in next_irq_event() is correct even though I think it could be > done more simply. But that can be optimized at a later time. > > Reviewed-by: Nicolas Pitre <n...@linaro.org>
Well, I'm likely overlooking something, but how is this going to be hooked up to the code in idle.c? Thanks, Rafael