From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753771AbcDVSVz (ORCPT ); Fri, 22 Apr 2016 14:21:55 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:37931 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753541AbcDVSVv (ORCPT ); Fri, 22 Apr 2016 14:21:51 -0400 Date: Fri, 22 Apr 2016 20:21:46 +0200 From: Daniel Lezcano To: tglx@linutronix.de Cc: nicolas.pitre@linaro.org, shreyas@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, peterz@infradead.org, rafael@kernel.org, vincent.guittot@linaro.org Subject: Re: [PATCH V4] irq: Track the interrupt timings Message-ID: <20160422182146.GC3974@linaro.org> References: <1460545556-15085-1-git-send-email-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460545556-15085-1-git-send-email-daniel.lezcano@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2016 at 01:05:56PM +0200, Daniel Lezcano wrote: > The interrupt framework gives a lot of information about each interrupt. > > It does not keep track of when those interrupts occur though. > > This patch provides a mean to record the elapsed time between successive > interrupt occurrences in a per-IRQ per-CPU circular buffer to help with the > prediction of the next occurrence using a statistical model. > > A new function is added to browse the different interrupts and retrieve the > timing information stored in it. > > A static key is introduced so when the irq prediction is switched off at > runtime, we can reduce the overhead near to zero. The irq timings is > supposed to be potentially used by different sub-systems and for this reason > the static key is a ref counter, so when the last use releases the irq > timings that will result on the effective deactivation of the irq measurement. > > Signed-off-by: Daniel Lezcano > Acked-by: Nicolas Pitre > --- > V4: > - Added a static key > - Added more comments for irq_timings_get_next() > - Unified some function names to be prefixed by 'irq_timings_...' > - Fixed a rebase error > V3: > - Replaced ktime_get() by local_clock() > - Shared irq are not handled > - Simplified code by adding the timing in the irqdesc struct > - Added a function to browse the irq timings > V2: > - Fixed kerneldoc comment > - Removed data field from the struct irq timing > - Changed the lock section comment > - Removed semi-colon style with empty stub > - Replaced macro by static inline > - Fixed static functions declaration > RFC: > - initial posting > --- Hi Thomas, do you think this patch is acceptable ?