Re: [PATCH V5] irq: Track the interrupt timings

From: Daniel Lezcano
Date: Tue Jun 14 2016 - 15:52:22 EST


On 06/14/2016 08:11 PM, Thomas Gleixner wrote:
On Tue, 14 Jun 2016, Nicolas Pitre wrote:
What about simply this:

void __handle_timings(struct irq_desc *desc)
{
struct irq_timings *timings = this_cpu_ptr(desc->timings);
timings->w_index = (timings->w_index + 1) & IRQ_TIMINGS_MASK;
timings->values[timings->w_index] = local_clock();
}

?

Then you could s/__handle_timings/__record_irq_time/ to better represent
what it does. And both the difference and the summing of squares could
be done upon entering idle instead.

And make it part of the handle_timings() inline to avoid the function call.

Ah yes, nice !


--
<http://www.linaro.org/> Linaro.org â Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog