Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1778875ybh; Fri, 13 Mar 2020 07:17:09 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvBhiCmatjRf75BIE8WqY5cT/MjYYOQ6q4E9ufZroDsOcewzVrk0uX+IxD8yc0b05a65UT2 X-Received: by 2002:a9d:4c98:: with SMTP id m24mr11639674otf.158.1584109029326; Fri, 13 Mar 2020 07:17:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584109029; cv=none; d=google.com; s=arc-20160816; b=HKAXL/+taJEzGcwlI5U4aXRCcoLfOxnGtZZg8WJoxtCorbiQnjQC1D5KnO7K/mD7G6 TfMig5kIJ78BKGE26S8jsRt9T2aOI10FUYmpC8RU/Gqy34j0YyJccy+v6oJaapNGwE2f 9FOH+4fMN6q6ZhS8ptQkgv3uWLUOdTqVVGJBazI7R5y76pEEawHofSDcbLhj4EeodkJm XPr57N6NO/9bWiz/bfyl8rGy3qWhAuRE2Wn0f5XZA92A0lwsh/QFbX4/ZEk9PbueC6zC UVpXIJYhcrQL1rbx9OjWSC2myd6xgGbO6SmB6M9trGwtzTTA1lTW5wqpQMHiPSTrDJxO lVRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=62iSq9ithetcVvmK51Oj8o/BAtkhXltgZwdmGVDdoAM=; b=eMshYQy8g3GJoCdH+5giiLp6ND7cTdsZeD3idK6ZV6qTxtoHe9+zK57VsorFUPUWSo WrWtoLeTTFvUxDivEzAV5MPxGeRsdlqQ5wVpZWDYkJit++6L5CWxjq6+Azsqef+h1F5G JhWDYu5N0XyF1ryTfS9oK70EnvmxY974N4xq2d5Jyt382YTDVAxGiKN7ZjmWeb6wSw+T 9gPG2t4W3ie6ODWZBH9R8x2hxpo5DZ4e9ozwnE83pD8uL5EbE0ve+aSbzMotloistdxi BBqHM/tE+wy3NopZLikwEv1DPbrr1X8Uy7PbC7SEreNsF6BOoC+O0dTIQR87DnujzQDJ E5Uw== 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 x7si4153467oie.189.2020.03.13.07.16.55; Fri, 13 Mar 2020 07:17:09 -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 S1726761AbgCMOOV (ORCPT + 99 others); Fri, 13 Mar 2020 10:14:21 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:2558 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726713AbgCMOOV (ORCPT ); Fri, 13 Mar 2020 10:14:21 -0400 Received: from LHREML712-CAH.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 532519DCF870C169B2BA; Fri, 13 Mar 2020 14:14:19 +0000 (GMT) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by LHREML712-CAH.china.huawei.com (10.201.108.35) with Microsoft SMTP Server (TLS) id 14.3.408.0; Fri, 13 Mar 2020 14:14:18 +0000 Received: from localhost (10.202.226.57) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 13 Mar 2020 14:14:18 +0000 Date: Fri, 13 Mar 2020 14:14:16 +0000 From: Jonathan Cameron To: Robin Murphy CC: Qi Liu , , , , , , , Subject: Re: [PATCH RFC] perf:Add driver for HiSilicon PCIe PMU Message-ID: <20200313141416.00002e89@Huawei.com> In-Reply-To: <49a04327-b58b-3103-f992-97e8838c41df@arm.com> References: <1584014816-1908-1-git-send-email-liuqi115@huawei.com> <49a04327-b58b-3103-f992-97e8838c41df@arm.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.226.57] X-ClientProxiedBy: lhreml723-chm.china.huawei.com (10.201.108.74) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Mar 2020 13:23:53 +0000 Robin Murphy wrote: > On 2020-03-12 12:06 pm, Qi Liu wrote: > > From: Qi liu > > > > PCIe PMU Root Complex Integrate End Point(IEP) device is > > supported to sample bandwidth, latency, buffer occupation, > > bandwidth utilization etc. > > Each PMU IEP device monitors multiple root ports, and each > > IEP is registered as a pmu in /sys/bus/event_source/devices, > > so users can select the target IEP, and use filter to select > > root port, function and event. > > Filtering options are: > > event: - select the event. > > subevent: - select the subevent. > > port: - select target root port. > > func: - select target EP device under the port. > > > > Example: hisi_pcie_00_14_00/event=0x08,subevent=0x04, \ > > port=0x05,func=0x00/ -I 1000 > > > > PMU IEP device is described by its bus, device and function, > > target root port is 0x05 and target EP under it is function > > 0x00. Subevent 0x04 of event 0x08 is sampled. > > > > Note that in this RFC: > > 1. PCIe PMU IEP hardware is still in development. > > 2. Perf common event list is undetermined, and name of these > > events still need to be discussed. > > 3. port filter could only select one port each time. > > 4. There are two possible schemes of pmu registration, one is > > register each root port as a pmu, it is easier for users to > > select target port. The other one is register each IEP as pmu, > > for counters are per IEP, not per root port, the second scheme > > describes hardware PMC much more reasonable, but need to add > > "port" filter option to select port. We use the second one in > > this RFC. > > Whilst it's great to have detailed feedback, just to make it clear... This is an RFC for the reasons above. They include that the hardware is still in development - i.e. we can't test it because they've not finished implementation yet. The intention of posting so early is to get some feedback on the general approach and the specific points in 2,3 and 4 above. The key fiddly point with this is that it is a shared PMU across a set of PCIe Root Ports (there are several of these devices on each SoC in the system covering a set of ports each). That makes for a somewhat fiddly interface, hence the RFC. Thanks to everyone who has reviewed though as definitely some stuff for liuqi to fix! Jonathan