From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH V12 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Date: Fri, 14 Jun 2019 11:23:02 +0100 Message-ID: <20190614102302.GD10659@fuggles.cambridge.arm.com> References: <1556736193-29411-1-git-send-email-Frank.Li@nxp.com> <1556736193-29411-2-git-send-email-Frank.Li@nxp.com> <20190613112320.GA18966@fuggles.cambridge.arm.com> <20190613174436.GG18966@fuggles.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Zhi Li Cc: "mark.rutland@arm.com" , Aisheng Dong , "devicetree@vger.kernel.org" , "andrew.smirnov@gmail.com" , "festevam@gmail.com" , "s.hauer@pengutronix.de" , Frank Li , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" List-Id: devicetree@vger.kernel.org On Thu, Jun 13, 2019 at 02:13:20PM -0500, Zhi Li wrote: > On Thu, Jun 13, 2019 at 12:44 PM Will Deacon wrote: > > > > On Thu, Jun 13, 2019 at 12:04:37PM -0500, Zhi Li wrote: > > > On Thu, Jun 13, 2019 at 6:23 AM Will Deacon wrote: > > > > > > > > On Wed, May 01, 2019 at 06:43:29PM +0000, Frank Li wrote: > > > > > Add ddr performance monitor support for iMX8QXP > > > > > > > > > > There are 4 counters for ddr perfomance events. > > > > > counter 0 is dedicated for cycles. > > > > > you choose any up to 3 no cycles events. > > > > > > > > > > for example: > > > > > > > > > > perf stat -a -e imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/,imx8_ddr0/precharge/ ls > > > > > perf stat -a -e imx8_ddr0/cycles/,imx8_ddr0/read-access/,imx8_ddr0/write-access/ ls > > > > > > > > I've pushed patches 1, 2 and 4 out with some minor tweaks to: > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-next/perf > > > > > > > > I'll leave the actual .dts change to go via the soc tree, since last time > > > > I took one of those it just resulted in conflicts. > > > > > > > > Frank, Andrey: Please could you try to run the perf fuzzer on this before > > > > it lands in mainline? It has a good track record of finding nasty PMU driver > > > > bugs, but it obviously requires access to hardware which implements the PMU: > > > > > > > > http://web.eece.maine.edu/~vweaver/projects/perf_events/fuzzer/ > > > > > > Okay, how long should be run generally? > > > I need make sure it can pass without my patches at our platform. > > > > As you long as you can really, but if it survives a few hours that's usually > > a good sign. Overnight is even better. > > Base on commit f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a > Author: Linus Torvalds > Date: Sun Jun 2 13:55:33 2019 -0700 > > Linux 5.2-rc3 > > RCU report problem: > > [ 6048.741784] rcu: INFO: rcu_preempt self-detected stall on CPU > [ 6048.747550] rcu: 1-....: (5249 ticks this GP) > idle=c5a/1/0x4000000000000004 softirq=503121/503121 fqs=2425 > [ 6048.757384] (t=5253 jiffies g=1416105 q=117) > [ 6048.761745] Task dump for CPU 1: > [ 6048.764977] perf_fuzzer R running task 0 32520 426 0x00000202 > [ 6048.772030] Call trace: > [ 6048.774493] dump_backtrace+0x0/0x130 > [ 6048.778159] show_stack+0x14/0x20 > [ 6048.781477] sched_show_task+0x108/0x138 > [ 6048.785401] dump_cpu_task+0x40/0x4c > [ 6048.788983] rcu_dump_cpu_stacks+0x94/0xd0 > [ 6048.793082] rcu_sched_clock_irq+0x5e0/0x918 > [ 6048.797357] update_process_times+0x2c/0x70 > [ 6048.801545] tick_sched_handle.isra.6+0x3c/0x50 > [ 6048.806076] tick_sched_timer+0x48/0x98 > [ 6048.809918] __hrtimer_run_queues+0x118/0x1a8 > [ 6048.814277] hrtimer_interrupt+0xe4/0x238 > [ 6048.818296] arch_timer_handler_phys+0x2c/0x38 > [ 6048.822743] handle_percpu_devid_irq+0x80/0x140 > [ 6048.827277] generic_handle_irq+0x24/0x38 This is the timer interrupt which prompts the RCU splat. Do you have information about where the CPU was when the interrupt occurred? In the meantime, it's still worth leaving the fuzzer running to see what else it finds. Will From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D5FFC31E44 for ; Fri, 14 Jun 2019 10:23:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 090F020851 for ; Fri, 14 Jun 2019 10:23:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="eDlRyY8a" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 090F020851 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1BZNYpsglPjM98aGqANXBF7xAsYiKdB+pFXkYQbFHu8=; b=eDlRyY8ayV/6a4 ktPoX2wU2torVVkXNUJhVNPq/M6XCej88LFKeGphFQMWqRtopo4ZCE8+/vBxx4bsxnkY9ViV6gFad mK1DzDFSFBjCnqz7ofxstv5nVlGe8I2/xAZ8f75CpphwLbUdjRpExpNgemjmEwJK+426tCOGp2I2K W26HFwJ9HtBC6AXKoXHGn1tdUS8FHxdRqk+R+bIdIybJWASImQI1sL3knZen/OQFKW4p1LaPo0Pus +4cuOLqfHJP4NlqEBEjwkjava3EiIqHDbtUQUNINHoJs2monSUzSg6NZgNqWIAbGQJt7mxdvJugED /C9lrf4Be7q3WrsGPXvQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbjMU-0006Zq-PE; Fri, 14 Jun 2019 10:23:10 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbjMR-0006ZR-DR for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 10:23:09 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 729083EF; Fri, 14 Jun 2019 03:23:06 -0700 (PDT) Received: from fuggles.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 974603F246; Fri, 14 Jun 2019 03:24:48 -0700 (PDT) Date: Fri, 14 Jun 2019 11:23:02 +0100 From: Will Deacon To: Zhi Li Subject: Re: [PATCH V12 2/4] drivers/perf: imx_ddr: Add ddr performance counter support Message-ID: <20190614102302.GD10659@fuggles.cambridge.arm.com> References: <1556736193-29411-1-git-send-email-Frank.Li@nxp.com> <1556736193-29411-2-git-send-email-Frank.Li@nxp.com> <20190613112320.GA18966@fuggles.cambridge.arm.com> <20190613174436.GG18966@fuggles.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+86 (6f28e57d73f2) () X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190614_032307_545712_0966397B X-CRM114-Status: GOOD ( 19.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "mark.rutland@arm.com" , Aisheng Dong , "devicetree@vger.kernel.org" , "andrew.smirnov@gmail.com" , "festevam@gmail.com" , "s.hauer@pengutronix.de" , Frank Li , "robh+dt@kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "shawnguo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 13, 2019 at 02:13:20PM -0500, Zhi Li wrote: > On Thu, Jun 13, 2019 at 12:44 PM Will Deacon wrote: > > > > On Thu, Jun 13, 2019 at 12:04:37PM -0500, Zhi Li wrote: > > > On Thu, Jun 13, 2019 at 6:23 AM Will Deacon wrote: > > > > > > > > On Wed, May 01, 2019 at 06:43:29PM +0000, Frank Li wrote: > > > > > Add ddr performance monitor support for iMX8QXP > > > > > > > > > > There are 4 counters for ddr perfomance events. > > > > > counter 0 is dedicated for cycles. > > > > > you choose any up to 3 no cycles events. > > > > > > > > > > for example: > > > > > > > > > > perf stat -a -e imx8_ddr0/read-cycles/,imx8_ddr0/write-cycles/,imx8_ddr0/precharge/ ls > > > > > perf stat -a -e imx8_ddr0/cycles/,imx8_ddr0/read-access/,imx8_ddr0/write-access/ ls > > > > > > > > I've pushed patches 1, 2 and 4 out with some minor tweaks to: > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-next/perf > > > > > > > > I'll leave the actual .dts change to go via the soc tree, since last time > > > > I took one of those it just resulted in conflicts. > > > > > > > > Frank, Andrey: Please could you try to run the perf fuzzer on this before > > > > it lands in mainline? It has a good track record of finding nasty PMU driver > > > > bugs, but it obviously requires access to hardware which implements the PMU: > > > > > > > > http://web.eece.maine.edu/~vweaver/projects/perf_events/fuzzer/ > > > > > > Okay, how long should be run generally? > > > I need make sure it can pass without my patches at our platform. > > > > As you long as you can really, but if it survives a few hours that's usually > > a good sign. Overnight is even better. > > Base on commit f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a > Author: Linus Torvalds > Date: Sun Jun 2 13:55:33 2019 -0700 > > Linux 5.2-rc3 > > RCU report problem: > > [ 6048.741784] rcu: INFO: rcu_preempt self-detected stall on CPU > [ 6048.747550] rcu: 1-....: (5249 ticks this GP) > idle=c5a/1/0x4000000000000004 softirq=503121/503121 fqs=2425 > [ 6048.757384] (t=5253 jiffies g=1416105 q=117) > [ 6048.761745] Task dump for CPU 1: > [ 6048.764977] perf_fuzzer R running task 0 32520 426 0x00000202 > [ 6048.772030] Call trace: > [ 6048.774493] dump_backtrace+0x0/0x130 > [ 6048.778159] show_stack+0x14/0x20 > [ 6048.781477] sched_show_task+0x108/0x138 > [ 6048.785401] dump_cpu_task+0x40/0x4c > [ 6048.788983] rcu_dump_cpu_stacks+0x94/0xd0 > [ 6048.793082] rcu_sched_clock_irq+0x5e0/0x918 > [ 6048.797357] update_process_times+0x2c/0x70 > [ 6048.801545] tick_sched_handle.isra.6+0x3c/0x50 > [ 6048.806076] tick_sched_timer+0x48/0x98 > [ 6048.809918] __hrtimer_run_queues+0x118/0x1a8 > [ 6048.814277] hrtimer_interrupt+0xe4/0x238 > [ 6048.818296] arch_timer_handler_phys+0x2c/0x38 > [ 6048.822743] handle_percpu_devid_irq+0x80/0x140 > [ 6048.827277] generic_handle_irq+0x24/0x38 This is the timer interrupt which prompts the RCU splat. Do you have information about where the CPU was when the interrupt occurred? In the meantime, it's still worth leaving the fuzzer running to see what else it finds. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel