From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbcFWNM3 (ORCPT ); Thu, 23 Jun 2016 09:12:29 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36654 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752470AbcFWNM2 (ORCPT ); Thu, 23 Jun 2016 09:12:28 -0400 Subject: Re: [PATCH V7] irq: Track the interrupt timings To: Thomas Gleixner References: <1466183776-5296-1-git-send-email-daniel.lezcano@linaro.org> <576BAE3F.5030603@linaro.org> 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 From: Daniel Lezcano Message-ID: <576BE039.9060703@linaro.org> Date: Thu, 23 Jun 2016 15:12:25 +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/23/2016 12:12 PM, Thomas Gleixner wrote: > On Thu, 23 Jun 2016, Daniel Lezcano wrote: >> On 06/23/2016 10:41 AM, Thomas Gleixner wrote: >>> Is it really required to do this per interrupt rather than providing per cpu >>> statistics of interrupts which arrived in the last X seconds or whatever >>> timeframe is relevant for this. >> >> Perhaps I am misunderstanding but if the statistics are done per cpu without >> tracking per irq timings, it is not possible to extract a repeating pattern >> for each irq and have an accurate prediction. > > I don't see why you need a repeating pattern for each irq. All you want to > know is whether there are repeating patterns of interrupts on a particular > cpu. > > struct per_cpu_stat { > u32 irq; > u64 ts; > }; > > storing 32 entries of the above should give you enough information about > patterns etc. If you have a high rate of interrupts on that cpu it does not > matter at all whether thats from one or several devices. If you have only a > few then this storage is sufficient to get the desired information. Mmmh, yes. I will investigate this patchset by replacing the percpu irqdesc's timings field by a per cpu irq event timings array. Thanks ! -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog