Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp687186rwd; Thu, 15 Jun 2023 00:09:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6ErLCtrsLPCpKFn5i5oxwmC+U2Deps2Kf8PaW8knXCAxdElXf9d1HVhse75HQWeavqaHvH X-Received: by 2002:a05:6a00:15d0:b0:663:65ba:d58b with SMTP id o16-20020a056a0015d000b0066365bad58bmr3988847pfu.9.1686812948655; Thu, 15 Jun 2023 00:09:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686812948; cv=none; d=google.com; s=arc-20160816; b=yBCa4+FySv9qWAhq3Xnssb0eDl4coO2epQDZECamTzzjc9TDqnc8BvSL2x7v+39ZEl 930XZLp4FeZlxwryZzi7gUV3FRNt2kZp00gj7gEWlCbW2nYmOu5gLrhviO0WbH8xA7yT JGqsmsoiD5B/HcKYGw4yk4Tb+uUDEeDd8rhqjNJAC2ek34L2XKitkBmV67JCGL/luKot ueeZXreJwfk4UNY4/VcfAwggLSykPz6VQYQUm2l1Dy+UCI52w+q6z4Qj5Dk7Cw0tbIDa 9D2k5I3H/M6PtL58NDKNf1XhwfNHK9myODUwwdwFoNc5uEypZroYgiavMGAb+JDwc6nm l72Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=EnsYKPFBWOkibEWdI0HCJrgTUVsFAnJDvmqyv8McRVw=; b=gN1ln7g5bSHCSbwXyZbzDcyKySvQO7aRDes+uqtac0epqthVOjIxOgcjM1a/EMwXkI fbIpc+KBYPhYeg918BZjxI/Dx3xI+cS/abMYz/5xJU178/8Rah2sOQnFx7grkCqZReTz kMLYeEDS08KDIHrr3rrBZ5iDkLcFtK0bPutq/SIV1RMX9nCXHVqMOjhCp+6vzdcDAb85 w+n1wEbovVztdyTI4CNPzz33GCLl9ndF6MhHcWcTVtXdfBdcCJwl78Vn45vF50sUHUF5 Ht/MyP7KFQmmlHxaWPLRpQod9ycz4/4LBG/UhyGsA+EdjsFxZXFb1vwzhqkFqdLhZ/I8 j3cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d7-20020aa797a7000000b006666b36b0desi2265864pfq.361.2023.06.15.00.08.56; Thu, 15 Jun 2023 00:09:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238236AbjFOG5V (ORCPT + 99 others); Thu, 15 Jun 2023 02:57:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243857AbjFOG5R (ORCPT ); Thu, 15 Jun 2023 02:57:17 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AAC92683 for ; Wed, 14 Jun 2023 23:57:10 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q9guZ-0008L7-GC; Thu, 15 Jun 2023 08:56:51 +0200 Received: from sha by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1q9guW-0005ja-Or; Thu, 15 Jun 2023 08:56:48 +0200 Date: Thu, 15 Jun 2023 08:56:48 +0200 From: Sascha Hauer To: Sebastian Reichel Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Heiko Stuebner , Kyungmin Park , MyungJoo Ham , Will Deacon , Mark Rutland , kernel@pengutronix.de, Michael Riesch , Robin Murphy , Vincent Legoll , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org Subject: Re: [PATCH v5 00/25] Add perf support to the rockchip-dfi driver Message-ID: <20230615065648.GD18491@pengutronix.de> References: <20230524083153.2046084-1-s.hauer@pengutronix.de> <20230614134034.3p3p75a3jophi2eu@mercury.elektranox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230614134034.3p3p75a3jophi2eu@mercury.elektranox.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On Wed, Jun 14, 2023 at 03:40:34PM +0200, Sebastian Reichel wrote: > Hi, > > On Wed, May 24, 2023 at 10:31:28AM +0200, Sascha Hauer wrote: > > This is v5 of the series adding perf support to the rockchip DFI driver. > > > > A lot has changed in the perf driver since v4. First of all the review > > feedback from Robin and Jonathan has been integrated. The perf driver > > now not only supports monitoring the total DDR utilization, but also the > > individual channels. I also reworked the way the raw 32bit counter > > values are summed up to 64bit perf values, so hopefully the code is > > easier to follow now. > > > > lockdep found out that that locking in the perf driver was broken, so I > > reworked that as well. None of the perf hooks allows locking with > > mutexes or spinlocks, so in perf it's not possible to enable the DFI > > controller when needed. Instead I now unconditionally enable the DFI > > controller during probe when perf is enabled. > > > > Furthermore the hrtimer I use for reading out the hardware counter > > values before they overflow race with perf. Now a seqlock is used to > > prevent that. > > > > The RK3588 device tree changes for the DFI were not part of v4. As > > Vincent Legoll showed interest in testing this series the necessary > > device tree changes are now part of this series. > > I tested the series on RK3588 EVB1. The read/write byts looks > sensible. Sometimes cycles reads unrealistic values, though: > > Performance counter stats for 'system wide': > > 18446744070475110400 rockchip_ddr/cycles/ I'll have a look later this day. I remember seeing this, but I thought this had been resolved already. Thanks for your feedback so far. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |