Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp224208rdb; Thu, 8 Feb 2024 04:22:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQMhGHrAqjlOh7rJ8dx387lCVkgZb3ReO1MxMcjmpAsyPmfl8CufMaoih/IgN7jM/LgvHc X-Received: by 2002:a05:620a:31a:b0:785:5b38:9267 with SMTP id s26-20020a05620a031a00b007855b389267mr9029215qkm.14.1707394938835; Thu, 08 Feb 2024 04:22:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707394938; cv=pass; d=google.com; s=arc-20160816; b=SplnpPiS9NGYONWDGryPPKKiYoqH6p6qPuZYtVYH4UYYmgo7zkym4fgT1a+5xmTB3T Kc8F5DdYJLWJVnxHBMZJOW+poKfjkuEhaGUE3xehmCQQ5czPhK7aTqYiUUDhfNICqo/q n6gtDKBYzOUUjrYdVgpcAKzwg/3GO1B9Df+oGEm+Y0gLR1waJWxwVM+rqQLqlhOyv4pA l2gFI9FDG2VWSrrVDRHqBezF0neJzFQRxEIN3yxAl+BtM9ZQho5eS71IOUQI28iVUWI/ q9viXTOFDprR/uiQ3pklJAKQn0M2DXrHYnhDaQTXGr7Gd+7bTTrUOMK4c7w9cxofBQCq GQoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=ccKUV6jAPBXEdfnziu35YloK4GkSlrc5tZAa29kH+C8=; fh=cIOrfDnFPeeg7Qf6Ka6rW5pjp/9dq82o24KvKHh18zE=; b=wDdLbqgGUqrPdCJ3oULzOHr2R8Vq1kNiCL7kOM/VaueXtpHx0w2Nv3LzvTZCc4dneU bfdlp0Nd+m+QJrNDZb8FJOtSIK5Yjbhdes98WEKAm+Cgq4kO8tyvqKmKDEeUYC7k0GKX y0AyrCLJjLu07lBU2r5ewXKbd6TKe6or3A1uOP6VM2oSmtKRGksO/p33RqtqYNy0HwIM 3X193oNtWpHbPzBWjcIwc/j4fOL7tZ6TJePZizelUYMNkBsfinB6Hm1gJJQQYpw03oPF wOPhDjFxYoTifyfB/iAasiYnUa9fWSyisIeUCLn5gs25MO2chUov77tZgSLAMKI6haKf qDfw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-58044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com X-Forwarded-Encrypted: i=2; AJvYcCVo7cvIlatAwmAyWcGEarcFxqV8N8c9mJXZPmv2jdxQkNkSWqLECx4BF3M+MnR9oCiPcEpu3TtODOL9lolQknPcNHtxqhwpLK535bKBLg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i27-20020a05620a145b00b007816c894164si3101835qkl.370.2024.02.08.04.22.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 04:22:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-58044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 56B421C26EBE for ; Thu, 8 Feb 2024 12:21:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43307745CA; Thu, 8 Feb 2024 12:20:35 +0000 (UTC) Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5982873182 for ; Thu, 8 Feb 2024 12:20:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707394834; cv=none; b=sUJJ0jTDOSenM7OobmwHkleseD3uuEuK8P9tuvcn2bAPzhQSBP6ltaKDLqYE8qYABGeAAaAji2FMZQc4a2i3feqPFX/QKny8vqP5crEHLScwjNshGc0sXG+sA059SKnJbodtG/1JVaYCIkHaeIEQPUem5dNQ8+sEf3rH54bVVxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707394834; c=relaxed/simple; bh=r+hfrA5qEDDdPsVezjcdkRd1w6ruSzwoWLPssdSs50o=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qua8jVDjJ5eg7jehyWWj3b79WqF65ziWBOjV0b85iNiX0v9eVHxs7tvxe/05NDfqa0tTSQjb7Nt2lmg/pkL2Haa9+yBWcZyzs7J+RGvXjAduu8aENFFPjt8tQ7yISduiZxVyLnp0rTlF6/HBUeba6NzRuNkCLLwA9vbl0LCzOM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.231]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4TVww84svfz6K98Q; Thu, 8 Feb 2024 20:17:12 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 9EA0A140136; Thu, 8 Feb 2024 20:20:30 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 8 Feb 2024 12:20:30 +0000 Date: Thu, 8 Feb 2024 12:20:29 +0000 From: Jonathan Cameron To: Yicong Yang CC: , , , , , , , , Subject: Re: [PATCH 3/7] drivers/perf: hisi_pcie: Add more events for counting TLP bandwidth Message-ID: <20240208122029.000005e1@Huawei.com> In-Reply-To: <20240204074527.47110-4-yangyicong@huawei.com> References: <20240204074527.47110-1-yangyicong@huawei.com> <20240204074527.47110-4-yangyicong@huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) On Sun, 4 Feb 2024 15:45:23 +0800 Yicong Yang wrote: > From: Yicong Yang > > A typical PCIe transaction is consisted of various TLP packets in both > direction. For counting bandwidth only memory read events are exported > currently. Add memory write and completion counting events of both > direction to complementation. complementation? > > Signed-off-by: Yicong Yang Reviewed-by: Jonathan Cameron > --- > drivers/perf/hisilicon/hisi_pcie_pmu.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/perf/hisilicon/hisi_pcie_pmu.c b/drivers/perf/hisilicon/hisi_pcie_pmu.c > index 9623bed93876..83be3390686c 100644 > --- a/drivers/perf/hisilicon/hisi_pcie_pmu.c > +++ b/drivers/perf/hisilicon/hisi_pcie_pmu.c > @@ -726,10 +726,18 @@ static struct attribute *hisi_pcie_pmu_events_attr[] = { > HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_cnt, 0x10210), > HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_latency, 0x0011), > HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_cnt, 0x10011), > + HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_flux, 0x0104), > + HISI_PCIE_PMU_EVENT_ATTR(rx_mwr_time, 0x10104), > HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_flux, 0x0804), > HISI_PCIE_PMU_EVENT_ATTR(rx_mrd_time, 0x10804), > + HISI_PCIE_PMU_EVENT_ATTR(rx_cpl_flux, 0x2004), > + HISI_PCIE_PMU_EVENT_ATTR(rx_cpl_time, 0x12004), > + HISI_PCIE_PMU_EVENT_ATTR(tx_mwr_flux, 0x0105), > + HISI_PCIE_PMU_EVENT_ATTR(tx_mwr_time, 0x10105), > HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_flux, 0x0405), > HISI_PCIE_PMU_EVENT_ATTR(tx_mrd_time, 0x10405), > + HISI_PCIE_PMU_EVENT_ATTR(tx_cpl_flux, 0x1005), > + HISI_PCIE_PMU_EVENT_ATTR(tx_cpl_time, 0x11005), > NULL > }; >