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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 EFC97C43461 for ; Thu, 17 Sep 2020 13:05:43 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 BC32320707 for ; Thu, 17 Sep 2020 13:05:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="htmYArh4" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC32320707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4Bscdv6WnGzDqHg for ; Thu, 17 Sep 2020 23:05:39 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=atrajeev@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=htmYArh4; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BscYh6ZFSzDqKW for ; Thu, 17 Sep 2020 23:02:00 +1000 (AEST) Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08HCVIoo116507; Thu, 17 Sep 2020 09:01:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=content-type : mime-version : subject : from : in-reply-to : date : cc : content-transfer-encoding : message-id : references : to; s=pp1; bh=7izOH/a7i6cuA8oOFTV65aajQNYCNbHTfXt/VVWNKKI=; b=htmYArh45bawzyCloAmVNGXMsA8zCbjTX5yvh+pZMClD4jvdHMxCp+hAg5vcXe2K/ydW 6N8PiM86Wr7oo/kcPqUL3j4+/e18yqquZT926yvyhbovrNOSVtQ8VVcHrsJoOyfRtscy +ksYO3QQlay9I28DG8XR8g88MmgNoCUaA4ESGakmkf2YvP9fO+D8ptF+Rx+II9V2vZBQ eIkXrE15pEcXYLG8gkQj0AfUZ48b/Ak6ACDKLqLndzQGUjtUsdENgJ8PMoPPK39tIHrZ 7pxw5n2jDY93Ud91X0PKyJ8iFxqcp7DCuoU+XXfD6h7eGiVqpP0Qh3vTMPrwPLoxGMIw +g== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 33m6ydttf5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Sep 2020 09:01:52 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 08HClT4o005462; Thu, 17 Sep 2020 13:01:51 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma06ams.nl.ibm.com with ESMTP id 33k9ge9yn7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 17 Sep 2020 13:01:50 +0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 08HD1mrB21758298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 17 Sep 2020 13:01:48 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B02964203F; Thu, 17 Sep 2020 13:01:48 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 91DFE42041; Thu, 17 Sep 2020 13:01:47 +0000 (GMT) Received: from [9.85.83.146] (unknown [9.85.83.146]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Thu, 17 Sep 2020 13:01:47 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Subject: Re: [PATCH] powerpc/perf: Exclude pmc5/6 from the irrelevant PMU group constraints From: Athira Rajeev In-Reply-To: <87wo0sob28.fsf@mpe.ellerman.id.au> Date: Thu, 17 Sep 2020 18:31:45 +0530 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1600257900-2043-1-git-send-email-atrajeev@linux.vnet.ibm.com> <87wo0sob28.fsf@mpe.ellerman.id.au> To: Michael Ellerman X-Mailer: Apple Mail (2.3608.120.23.2.1) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-17_08:2020-09-16, 2020-09-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 impostorscore=0 lowpriorityscore=0 clxscore=1015 spamscore=0 mlxlogscore=999 mlxscore=0 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009170096 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maddy@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" > On 17-Sep-2020, at 5:43 PM, Michael Ellerman = wrote: >=20 > Athira Rajeev writes: >> PMU counter support functions enforces event constraints for group of >> events to check if all events in a group can be monitored. Incase of >> event codes using PMC5 and PMC6 ( 500fa and 600f4 respectively ), >> not all constraints are applicable, say the threshold or sample bits. >> But current code includes pmc5 and pmc6 in some group constraints = (like >> IC_DC Qualifier bits) which is actually not applicable and hence = results >> in those events not getting counted when scheduled along with group = of >> other events. Patch fixes this by excluding PMC5/6 from constraints >> which are not relevant for it. >>=20 >> Fixes: 7ffd948 ('powerpc/perf: factor out power8 pmu functions') >> Signed-off-by: Athira Rajeev >> --- >> arch/powerpc/perf/isa207-common.c | 4 ++++ >> 1 file changed, 4 insertions(+) >>=20 >> diff --git a/arch/powerpc/perf/isa207-common.c = b/arch/powerpc/perf/isa207-common.c >> index 964437a..186fad8 100644 >> --- a/arch/powerpc/perf/isa207-common.c >> +++ b/arch/powerpc/perf/isa207-common.c >> @@ -288,6 +288,9 @@ int isa207_get_constraint(u64 event, unsigned = long *maskp, unsigned long *valp) >>=20 >> mask |=3D CNST_PMC_MASK(pmc); >> value |=3D CNST_PMC_VAL(pmc); >> + >> + if (pmc >=3D 5) >> + goto ebb_bhrb; >=20 > This is fairly subtle. Can you please put a block comment above the if > explaining in a few lines what's going on. Hi Michael, Sure, I will include a comment explaining the change in V2. Thanks Athira >=20 > cheers