From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752694AbcFNTwO (ORCPT ); Tue, 14 Jun 2016 15:52:14 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:38641 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751392AbcFNTwN (ORCPT ); Tue, 14 Jun 2016 15:52:13 -0400 Subject: Re: [PATCH V5] irq: Track the interrupt timings To: Thomas Gleixner , Nicolas Pitre References: <1465922036-27100-1-git-send-email-daniel.lezcano@linaro.org> Cc: shreyas@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, peterz@infradead.org, rafael@kernel.org, vincent.guittot@linaro.org From: Daniel Lezcano Message-ID: <57606068.3000209@linaro.org> Date: Tue, 14 Jun 2016 21:52:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ! -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog