From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758727AbcH3Mye (ORCPT ); Tue, 30 Aug 2016 08:54:34 -0400 Received: from foss.arm.com ([217.140.101.70]:39416 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757333AbcH3Myd (ORCPT ); Tue, 30 Aug 2016 08:54:33 -0400 Date: Tue, 30 Aug 2016 13:54:20 +0100 From: Mark Rutland To: Shawn Guo Cc: Zhi Li , Zhengyu Shen , Frank Li , "linux-arm-kernel@lists.infradead.org" , kernel list , peterz@infradead.org, mingo@redhat.com, acme@kernel.org, alexander.shishkin@linux.intel.com Subject: Re: [PATCH v3] Added perf functionality to mmdc driver Message-ID: <20160830125420.GG1223@leverpostej> References: <20160817194253.16300-1-zhengyu.shen@nxp.com> <20160830114329.GB8366@tiger> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160830114329.GB8366@tiger> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Aug 30, 2016 at 07:43:29PM +0800, Shawn Guo wrote: > On Mon, Aug 29, 2016 at 11:06:44AM -0500, Zhi Li wrote: > > On Wed, Aug 17, 2016 at 2:42 PM, Zhengyu Shen wrote: > > > MMDC is a multi-mode DDR controller that supports DDR3/DDR3L x16/x32/x64 > > > and LPDDR2 two channel x16/x32 memory types. MMDC is configurable, high > > > performance, and optimized. MMDC is present on i.MX6 Quad and i.MX6 > > > QuadPlus devices, but this driver only supports i.MX6 Quad at the moment. > > > MMDC provides registers for performance counters which read via this > > > driver to help debug memory throughput and similar issues. > > > > > > $ perf stat -a -e mmdc/busy-cycles/,mmdc/read-accesses/,mmdc/read-bytes/,mmdc/total-cycles/,mmdc/write-accesses/,mmdc/write-bytes/ dd if=/dev/zero of=/dev/null bs=1M count=5000 > > > Performance counter stats for 'dd if=/dev/zero of=/dev/null bs=1M count=5000': > > > > > > 898021787 mmdc/busy-cycles/ > > > 14819600 mmdc/read-accesses/ > > > 471.30 MB mmdc/read-bytes/ > > > 2815419216 mmdc/total-cycles/ > > > 13367354 mmdc/write-accesses/ > > > 427.76 MB mmdc/write-bytes/ > > > > > > 5.334757334 seconds time elapsed > > > > > > Signed-off-by: Zhengyu Shen > > > Signed-off-by: Frank Li > > > > Shawn Guo: > > > > No new comments got more than 1 weeks. > > Did you plan accept it? > > @Mark, how do you think of this version? Sorry, I've been away for the last week and haven't had the chance to look at this yet. I will try to get round to it in the next few days. In the meantime, could you please try attacking this with Vince's perf fuzzer [1] (as root, or with perf_event_paranoid dropped to -1)? It's rather good at finding (subtle) issues in drivers. Thanks, Mark. [1] https://github.com/deater/perf_event_tests