Re: [RFC V2 2/2] sched: idle: IRQ based next prediction for idle period

From: Thomas Gleixner
Date: Thu Jan 21 2016 - 09:13:17 EST


On Thu, 21 Jan 2016, Daniel Lezcano wrote:
> On 01/20/2016 08:49 PM, Thomas Gleixner wrote:
> > So now for the allocation/free of that data. We simply allocate/free it
> > along
> > with the irq descriptor. That IRQS_TIMING bit gets set in __setup_irq()
> > except
> > for timer interrupts. That's simple and avoid _all_ the issues.
>
> Indeed, making this as part of the irq code makes everything much more simple
> and self contained. For the shared interrupts, shouldn't we put the timings
> samples into the irqaction structure instead of the irqdesc structure ?
>
> eg.
>
> #define IRQT_MAX_VALUES 4
>
> struct irqaction {
> ...
> #ifdef CONFIG_IRQ_TIMINGS
> u32 irqtimings_samples[IRQT_MAX_VALUES];
> #endif
> ...
> };
>
> So we don't have to deal with the allocation/free under locks. The drawback is
> the array won't be used in the case of the timers.

I still have to ask the question whether a per device information is useful at
all. I don't see the value, but I might miss something.

Thanks,

tglx