Message ID | 20230621092804.15120-1-yangyicong@huawei.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4235206vqr; Wed, 21 Jun 2023 02:35:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SONnr0vFLYWl9ISr2U0l2KLkA7B+ape79K9RO0xCvYqY5il72oOanaRjcg2XGb9vzJZZF X-Received: by 2002:a05:6a20:7349:b0:11c:d2d0:6439 with SMTP id v9-20020a056a20734900b0011cd2d06439mr29913697pzc.25.1687340107924; Wed, 21 Jun 2023 02:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687340107; cv=none; d=google.com; s=arc-20160816; b=eihXOtZ/Cvz4ViJmHKGoRAK7Bk5JXRCyO4yHlmDaagEi7x2Wqh0FvcFYweU4wU+kcI 2F7QhSSH5GcbAKt87M7HcPLGOlQBdMQ1BglMgbJDpf+J3MFyQIwc47oIZNxVg40ScV7E 4P9zlhtdAv5jfBtC2vSMwkLTTkjz+EeyPHrrcM77F+NuBjLW9weQYZ3fJ4lBeyuj09Sc 57UGi58gHU/an7XqZQceZMPLjwnksjgvTJmXQm3vtlE5eH/+1UyUXHt7tAcDFkmLJj6U 03qpDmkK64geS7cdvvKz6ErrlDlx1H7B9HHcffubJyugFct09wKDUUEfx0WofU5HDOyO paPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Q8rv8fO1PSCwp6HikWfgdvczEELBHpVEgIUXCOttzXA=; b=fXb6LHTpVskaLtelJmP+lWNdCCXjZXtuaSEe3xKSLt7y6ho45X5S7Pfr7FpEqhdvZq TJMRYQ5khDV4jd5k+aIEftxYMpUYcsgxyIF3du3n3Qjs/qwl9GmGXbAQwHTkV2v+PPQ6 HkTmJsTBLrHtaAJ1fEv04db8b+DsV3lKLnCfiAFOaOMht1k10hHVx5KiJG1RW9Z4jfPC fkypz4xLfh54hl0kdMGhH0y3kPD41HJrcNFhK8Pk3/nzZ/C6/1j9A6GTd7QghZB1p0Jp t3894zZEAk0k+yiyUkT/jUf/WJIi8938dxP+uqrz1kNP6Jj4ghKLmmAhavoUWeSwZN5+ kang== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020a637e52000000b0055384255b9bsi3690029pgn.24.2023.06.21.02.34.54; Wed, 21 Jun 2023 02:35:07 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231150AbjFUJbL (ORCPT <rfc822;maxin.john@gmail.com> + 99 others); Wed, 21 Jun 2023 05:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232292AbjFUJao (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 21 Jun 2023 05:30:44 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16DB61992; Wed, 21 Jun 2023 02:29:44 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QmJ7j0pgszLmlX; Wed, 21 Jun 2023 17:27:45 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 21 Jun 2023 17:29:42 +0800 From: Yicong Yang <yangyicong@huawei.com> To: <mathieu.poirier@linaro.org>, <suzuki.poulose@arm.com>, <jonathan.cameron@huawei.com>, <corbet@lwn.net>, <linux-kernel@vger.kernel.org>, <linux-doc@vger.kernel.org> CC: <alexander.shishkin@linux.intel.com>, <helgaas@kernel.org>, <linux-pci@vger.kernel.org>, <prime.zeng@huawei.com>, <linuxarm@huawei.com>, <yangyicong@hisilicon.com>, <hejunhao3@huawei.com> Subject: [PATCH v6 0/5] Improve PTT filter interface and some fixes Date: Wed, 21 Jun 2023 17:27:59 +0800 Message-ID: <20230621092804.15120-1-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769304341301466142?= X-GMAIL-MSGID: =?utf-8?q?1769304341301466142?= |
Series |
Improve PTT filter interface and some fixes
|
|
Message
Yicong Yang
June 21, 2023, 9:27 a.m. UTC
From: Yicong Yang <yangyicong@hisilicon.com>
This series tends to improve the PTT's filter interface in 2 aspects (Patch 2&3):
- Support dynamically filter updating to response to hotplug
Previous the supported filter list is settled down once the driver probed and
it maybe out-of-date if hotplug events happen later. User need to reload the
driver to update list. Patch 1/2 enable the driver to update the list by
registering a PCI bus notifier and the filter list will always be the latest.
- Export the available filters through sysfs
Previous user needs to calculate the filters and filter value using device's
BDF number, which requires the user to know the hardware well. Patch 3/3 tends
to export the available filter information through sysfs attributes, the filter
value will be gotten by reading the file. This will be more user friendly.
In order to support above function, this series also includes a patch 1/4 to factor
out the allocation and release function of PTT filters.
Also includes an improvement and a fix. Patch 4 tends to set proper PMU capability
to avoid collecting unnecessary data to save the storage. Patch 5 fix an improper
use of pci_irq_vector() which have potential problem.
Change since v5:
- PERF_PMU_CAP_EXCLUSIVE is still needed so keep it as is, thanks Junhao for pointing it
Link: https://lore.kernel.org/all/01c39cb9-e56a-862b-2d99-024b7ba5a769@huawei.com/
Change since v4:
- Add tags for Patch 2,3,5 and tweak some comments/docs in Patch 3
Link: https://lore.kernel.org/all/20230606142244.10939-1-yangyicong@huawei.com/
Change since v3:
- Addressed the comment from Jonathan. Add tags for Patch 1 and 4. Thanks.
- Add one bugfix in Patch 5/5
Link: https://lore.kernel.org/linux-pci/20230523093228.48149-1-yangyicong@huawei.com/
Change since v2:
- Fix one possible issue for dereferencing a NULL pointer
Link: https://lore.kernel.org/linux-pci/20230331070310.5465-1-yangyicong@huawei.com/
Change since v1:
- Drop the patch for handling the cpumask since it seems to be redundant
- Refine of the codes per Jonathan
- Add Patch 1/4 for refactor the filters allocation and release
- Thanks the review of Jonathan.
Link: https://lore.kernel.org/linux-pci/d496ee4f-641a-a726-ab3f-62b587422b61@huawei.com/T/#m47e4de552d69920035214b3e91080cdc185f61f5
Yicong Yang (5):
hwtracing: hisi_ptt: Factor out filter allocation and release
operation
hwtracing: hisi_ptt: Add support for dynamically updating the filter
list
hwtracing: hisi_ptt: Export available filters through sysfs
hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU
hwtracing: hisi_ptt: Fix potential sleep in atomic context
.../ABI/testing/sysfs-devices-hisi_ptt | 52 ++
Documentation/trace/hisi-ptt.rst | 12 +-
drivers/hwtracing/ptt/hisi_ptt.c | 444 ++++++++++++++++--
drivers/hwtracing/ptt/hisi_ptt.h | 56 +++
4 files changed, 526 insertions(+), 38 deletions(-)
Comments
On Wed, 21 Jun 2023 17:27:59 +0800, Yicong Yang wrote: > From: Yicong Yang <yangyicong@hisilicon.com> > > This series tends to improve the PTT's filter interface in 2 aspects (Patch 2&3): > - Support dynamically filter updating to response to hotplug > Previous the supported filter list is settled down once the driver probed and > it maybe out-of-date if hotplug events happen later. User need to reload the > driver to update list. Patch 1/2 enable the driver to update the list by > registering a PCI bus notifier and the filter list will always be the latest. > - Export the available filters through sysfs > Previous user needs to calculate the filters and filter value using device's > BDF number, which requires the user to know the hardware well. Patch 3/3 tends > to export the available filter information through sysfs attributes, the filter > value will be gotten by reading the file. This will be more user friendly. > > [...] Applied, thanks! [1/5] hwtracing: hisi_ptt: Factor out filter allocation and release operation commit: a3ecaba7017f5d02d1ad60229cc14d5f0cda0c20 [2/5] hwtracing: hisi_ptt: Add support for dynamically updating the filter list commit: 556ef09392dbc2d0b9aad5fd880d5d11addfc40d [3/5] hwtracing: hisi_ptt: Export available filters through sysfs commit: 6373c463ac894e41cab24469d1947ff91aaea486 [4/5] hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU commit: 45c90292ad0e275ef4b870838b3b5273b3ef8ade [5/5] hwtracing: hisi_ptt: Fix potential sleep in atomic context commit: 6c50384ef8b94a527445e3694ae6549e1f15d859 Best regards,