Path: csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod From: Daniel Lezcano Newsgroups: linux.kernel Subject: Re: [PATCH V5] irq: Track the interrupt timings Date: Tue, 14 Jun 2016 22:00:02 +0200 Message-ID: References: X-Original-To: Thomas Gleixner , Nicolas Pitre Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=LQf6SO3oyIPAuynyaKheE/nPRuea3WiTnC2z4V619Jk=; b=CkfmQ2Ej2v7NdKM9sEO13NGZUAj5cSOKGqXAYOe6LiZmMnVZK/dycvU5J2tndAXiRz R9LVY5YV3Cyg+nQ562QsTvs4Bdi4WBQBZL5kom4/45L7PJbeJH2z6cfkhTWhQ7A7Hy07 tL3UXQeveFRDXNZVIEO9mp+iDMhqA2NxIzc9k= X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=LQf6SO3oyIPAuynyaKheE/nPRuea3WiTnC2z4V619Jk=; b=jw7Cq38x+xYgIiyick9KQicS9DJxePTdkZPaV9JQ2Ri8OY64I2se7IQXIiVtrxZVK7 Wu6BcyYimBolY1blmglnPOT8PeClwZkKeipQ5WYv2/NOJEvtpXEVhvoC6sX/B133c8uh 5L4V+xQAAxe+LZv8qtnJj1Xr+3fgT43GT573m9tq+0PfAOb/jhs4jtw/PCTMe/WRwNJM n1nytUaVR77Bw9qKpBVSw8XAVx/q4HyIXqUZUW6sJHfu50+T1gG0edEA11dISj3pe05d gdCmB6uhrTIpJNJM+h9e5TBHlb96svy6mX4MrUEgxkX1rT1Zj5tMZ9ZUpLLV8Nymg6Aq qX4Q== X-Gm-Message-State: ALyK8tJEx5sgA9LENcy5q3q9qbaVuK1MY6zeXbTwyOrwX5niaAcDc1Kl7N6vdwzuAs41xfE/ X-Received: by 10.194.96.177 with SMTP id dt17mr7605415wjb.90.1465933931754; Tue, 14 Jun 2016 12:52:11 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 28 Organization: linux.* mail to news gateway X-Original-Cc: shreyas@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, peterz@infradead.org, rafael@kernel.org, vincent.guittot@linaro.org X-Original-Date: Tue, 14 Jun 2016 21:52:08 +0200 X-Original-Message-ID: <57606068.3000209@linaro.org> X-Original-References: <1465922036-27100-1-git-send-email-daniel.lezcano@linaro.org> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1422262 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