From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932127AbcFNUiM (ORCPT ); Tue, 14 Jun 2016 16:38:12 -0400 Received: from mail-qk0-f179.google.com ([209.85.220.179]:33852 "EHLO mail-qk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbcFNUiK (ORCPT ); Tue, 14 Jun 2016 16:38:10 -0400 Date: Tue, 14 Jun 2016 16:38:06 -0400 (EDT) From: Nicolas Pitre To: Daniel Lezcano cc: tglx@linutronix.de, shreyas@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, peterz@infradead.org, rafael@kernel.org, vincent.guittot@linaro.org Subject: Re: [PATCH V6] irq: Track the interrupt timings In-Reply-To: <1465935043-4844-1-git-send-email-daniel.lezcano@linaro.org> Message-ID: References: <1465935043-4844-1-git-send-email-daniel.lezcano@linaro.org> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jun 2016, 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 > --- > V6: > - Renamed handle_irq_timings to record_irq_time > - Stored the event time instead of the interval time > - Removed the 'timestamp' field from the timings structure > - Moved _handle_irq_timings content inside record_irq_time Looks fine to me. Nicolas