From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965316AbcAUONM (ORCPT ); Thu, 21 Jan 2016 09:13:12 -0500 Received: from www.linutronix.de ([62.245.132.108]:38450 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965270AbcAUONK (ORCPT ); Thu, 21 Jan 2016 09:13:10 -0500 Date: Thu, 21 Jan 2016 15:12:07 +0100 (CET) From: Thomas Gleixner To: Daniel Lezcano cc: peterz@infradead.org, rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, nicolas.pitre@linaro.org, vincent.guittot@linaro.org Subject: Re: [RFC V2 2/2] sched: idle: IRQ based next prediction for idle period In-Reply-To: <56A0E31A.6020001@linaro.org> Message-ID: References: <1453305636-22156-1-git-send-email-daniel.lezcano@linaro.org> <1453305636-22156-3-git-send-email-daniel.lezcano@linaro.org> <56A0E31A.6020001@linaro.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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