From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754414AbcH3UBY (ORCPT ); Tue, 30 Aug 2016 16:01:24 -0400 Received: from mail-db5eur01on0051.outbound.protection.outlook.com ([104.47.2.51]:50935 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751252AbcH3UBX (ORCPT ); Tue, 30 Aug 2016 16:01:23 -0400 From: Zhengyu Shen To: Mark Rutland , Shawn Guo CC: Zhi Li , 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 Thread-Topic: [PATCH v3] Added perf functionality to mmdc driver Thread-Index: AQHR+L+e70Ep4DhepkyTyuD9/+rUwKBgLS0AgAFIx4CAABPMAIAAcg9w Date: Tue, 30 Aug 2016 20:01:18 +0000 Message-ID: References: <20160817194253.16300-1-zhengyu.shen@nxp.com> <20160830114329.GB8366@tiger> <20160830125420.GG1223@leverpostej> In-Reply-To: <20160830125420.GG1223@leverpostej> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=zhengyu.shen@nxp.com; x-originating-ip: [192.88.168.1] x-ms-office365-filtering-correlation-id: 16da30ff-a774-4c51-90c0-08d3d1106803 x-microsoft-exchange-diagnostics: 1;DB4PR04MB267;6:syaWf04aVrLiw4gY8xyIAScNowhrlGHPFsH+Grb3oIlXmbUVJ4tII2Vx+lRrZCjEDnCqV72TSTtvvz/3QprvocTu1UBxetWUGOEvmDpFyiNOotmQG1ZLZpMKzzSQ3txjifCN/l82NJ+MXhaiUctW0l37O6ITN8+sevW4Wle23tWUaEkGWNqu69Pn1KnfN0RXfspoGmvjXHgbd1c5l4392uFG4WTilFJh+GBNK1+T5eVTs65oZogEp47eOeEGFizzsnHJXFJjBd5E2rFviGIkJfFbuN+QdX3npV/QZSUIVNZ7D+Rl1Ih3QgUQtQv2yx+9GhOjBoVa36Z5M6+sdAXkHw==;5:bAZ2PeAHneyh2ww7HUx9BxYoGx7Oyw1GzOjK5a4EdnSuaPYLbMDqdNvauC0rVZMK3wcBAQz/12JBDlbhILHdqHGppZi+yMyXCUkPSJOn5i0fX3cnaSX7PlpuY6yhZTVYT8d3W596h5zAr8pxB914Qg==;24:rMEQOHUykRs8ZNZbaGpmUFG3Dmw4G/NrXhzLh7KStyMIgppFKJE2mIlI8kviXYpoUljozzZlclf0uTNQ6SHRzCkgZbasMxFi7gBQXRNdmvI=;7:wZY9RcZCmOQ2DT58zVtG/hskkQN/dw4QdZ8S2o/KT2eS4x6WEKVoR5Ge2npimnuzQY1eHvH7sfblme9Zk6IL00maTxVecUFSoUoXn7LTimKisPRA55MErwXac73pe5IxqiRg7sKoU8gLhCQMeqMjBeZO7Zsiuvilvd2Cbt/Y3W6QxlNNa4U+z4iCXKlf2oE3x6ytnKnc2nf+yReSx8bS7qmafz0NGfcK2dy872YcfYc7xeazeuf9M+zdOMJrsGdp x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB267; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(20558992708506)(166708455590820)(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026);SRVR:DB4PR04MB267;BCL:0;PCL:0;RULEID:;SRVR:DB4PR04MB267; x-forefront-prvs: 0050CEFE70 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(24454002)(199003)(377454003)(55674003)(105586002)(15975445007)(7846002)(9686002)(50986999)(3280700002)(8936002)(7696003)(54356999)(305945005)(76176999)(7736002)(189998001)(2900100001)(4326007)(586003)(2906002)(68736007)(8676002)(3660700001)(92566002)(106356001)(2950100001)(5002640100001)(66066001)(87936001)(33656002)(97736004)(5001770100001)(122556002)(106116001)(86362001)(74316002)(76576001)(3846002)(102836003)(77096005)(93886004)(101416001)(19580395003)(11100500001)(81166006)(81156014)(6116002)(5660300001)(10400500002)(19580405001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB4PR04MB267;H:DB5PR04MB1430.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Aug 2016 20:01:18.2406 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB267 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id u7UK1TYX032200 > 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 Hi, I've done some testing with the fuzzer. Mmdc was only responsible for one crash which I fixed (had to remove the event from the pmu properly). Other drivers also cause crashes and the program reports that events are Throttling. Is this normal?