Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp877314ybl; Tue, 13 Aug 2019 04:08:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtdrBxb4rVhcGdri8WgoXc7ceHXcmdfk9vB9Y9Spre/YAIQl9FxNG2/iSlvGgUlZ+DAfue X-Received: by 2002:a17:90b:28f:: with SMTP id az15mr1699348pjb.18.1565694524313; Tue, 13 Aug 2019 04:08:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565694524; cv=none; d=google.com; s=arc-20160816; b=F80m7QwHe3QT1yBHRmYGKtsk28mDNeMrrZtjXYIu04tT4SfkExwlm5vCtO8yq5TTlw GJ4zUZAMm+QA/Bi+M5GZmIJp4cCMshb0qKeIFAgcI+QnsX1lG1gT9sACNKYPuY+zDCmn xwfgrvEMx2TptBSxWqHN+z+T+T5GqWUlBdKBNLJBWU8RBPFqtpjo0OEy0/FYN/kTm/9J r+ZarhVO5F8Q2DdmXzEExjHL7EX5Z6xW3IpRNBBsKBPz4+AsoQctrGF1UUNsvIyvT/fN XquJnLFE/4pMfX/Q2DVduyXb4pmnmCFc93+/6o2fB6PqtCisuRWwjPxg9TsKQu3FWHo5 cjeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=q0qDk6jIbnP0CU03lhQ/P4toj5sR30SmrL+cBeJbHwA=; b=U3fD1vfw6VmEg7NXJwXYy1MqufPIFRxKFhGLYUN6CfI5HL0HDC5NAR0U9PO3ARHU8E XmJBm+hVB0h3nR97M3Ed6UZuSd3NVPcZVmuQLZXVyj+k3CQbYVjqUy0/+Ro96J3kvdeb 23xIIuv6h7twHRYBT5bwi9+Z0KqvXVooXXjL89nSkot1OW8RvP191+LzUYlfkryCkrEk sf0ogtvGZbGhCWG8c18yFp+ae/YiWUT6WwNAG5WDLuAuz7UguhSk1OzckLoijFEjOtbY CYL8NlqcxRdIhCPePhtHWIrya4H+/rGknj7H20eNn3SV4QbKmP8sTqpwolJysO9plEEb HdOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si66160431pgj.171.2019.08.13.04.08.28; Tue, 13 Aug 2019 04:08:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728086AbfHMLDv (ORCPT + 99 others); Tue, 13 Aug 2019 07:03:51 -0400 Received: from foss.arm.com ([217.140.110.172]:34028 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbfHMLDu (ORCPT ); Tue, 13 Aug 2019 07:03:50 -0400 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 4CAEB344; Tue, 13 Aug 2019 04:03:49 -0700 (PDT) Received: from lakrids.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 E76203F694; Tue, 13 Aug 2019 04:03:47 -0700 (PDT) Date: Tue, 13 Aug 2019 12:03:45 +0100 From: Mark Rutland To: Ganapatrao Kulkarni Cc: Ganapatrao Kulkarni , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "will@kernel.org" , "corbet@lwn.net" , Jayachandran Chandrasekharan Nair , Robert Richter , Jan Glauber Subject: Re: [PATCH v3 2/2] drivers/perf: Add CCPI2 PMU support in ThunderX2 UNCORE driver. Message-ID: <20190813110345.GD866@lakrids.cambridge.arm.com> References: <1563873380-2003-1-git-send-email-gkulkarni@marvell.com> <1563873380-2003-3-git-send-email-gkulkarni@marvell.com> <20190812120125.GA50712@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 04:25:15PM +0530, Ganapatrao Kulkarni wrote: > Hi Mark, > > On Mon, Aug 12, 2019 at 5:31 PM Mark Rutland wrote: > > > > On Tue, Jul 23, 2019 at 09:16:28AM +0000, Ganapatrao Kulkarni wrote: > > > CCPI2 is a low-latency high-bandwidth serial interface for connecting > > > ThunderX2 processors. This patch adds support to capture CCPI2 perf events. > > > > It would be worth pointing out in the commit message how the CCPI2 > > counters differ from the others. I realise you have that in the body of > > patch 1, but it's critical information when reviewing this patch... > > Ok, I will add in next version. > > > > > > > > Signed-off-by: Ganapatrao Kulkarni > > > --- > > > drivers/perf/thunderx2_pmu.c | 248 ++++++++++++++++++++++++++++++----- > > > 1 file changed, 214 insertions(+), 34 deletions(-) > > > > > > diff --git a/drivers/perf/thunderx2_pmu.c b/drivers/perf/thunderx2_pmu.c > > > index 43d76c85da56..a4e1273eafa3 100644 > > > --- a/drivers/perf/thunderx2_pmu.c > > > +++ b/drivers/perf/thunderx2_pmu.c > > > @@ -17,22 +17,31 @@ > > > */ > > > > > > #define TX2_PMU_MAX_COUNTERS 4 > > > > Shouldn't this be 8 now? > > It is kept unchanged to 4(as suggested by Will), which is same for > both L3 and DMC. > For CCPI2 this macro is not used. Hmmm.... I disagree with that suggestion given that this also affects the active_counters bitmap size (and thus it is not correctly sized as of this patch), and it doesn't really save us much. I think it would be better to bump this to 8 and always update the events array, even though it will be unused for CCPI2. That's less surprising, needs fewer special-cases, and we can use the hrtimer function pointer alone to determine if we need to do any hrtimer work. Thanks, Mark.