From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 A1E9BC433B4 for ; Mon, 19 Apr 2021 13:30:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EE2461027 for ; Mon, 19 Apr 2021 13:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241262AbhDSNbV (ORCPT ); Mon, 19 Apr 2021 09:31:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:17796 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241261AbhDSNWV (ORCPT ); Mon, 19 Apr 2021 09:22:21 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FP6q30PrFz7vwY; Mon, 19 Apr 2021 21:19:27 +0800 (CST) Received: from [127.0.0.1] (10.69.38.196) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Mon, 19 Apr 2021 21:21:38 +0800 Subject: Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device To: Suzuki K Poulose , , , , CC: , , , , , , , , , , , , , , , References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> <529defac-cd67-3a7b-91d3-76eb0bb9dc6c@arm.com> From: Yicong Yang Message-ID: Date: Mon, 19 Apr 2021 21:21:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <529defac-cd67-3a7b-91d3-76eb0bb9dc6c@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.38.196] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/4/19 19:17, Suzuki K Poulose wrote: > On 17/04/2021 11:17, Yicong Yang wrote: >> [RESEND with perf and coresight folks Cc'ed] >> >> HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex >> integrated Endpoint (RCiEP) device, providing the capability >> to dynamically monitor and tune the PCIe traffic (tune), >> and trace the TLP headers (trace). >> >> PTT tune is designed for monitoring and adjusting PCIe link parameters. >> We provide several parameters of the PCIe link. Through the driver, >> user can adjust the value of certain parameter to affect the PCIe link >> for the purpose of enhancing the performance in certian situation. > > ... > >> >> The reason for not using perf is because there is no current support >> for uncore tracing in the perf facilities. We have our own format >> of data and don't need perf doing the parsing. The setting through >> perf tools doesn't seem to be friendly as well. For example, >> we cannot count on perf to decode the usual format BDF number like >> ::., which user can use to filter the TLP >> headers through the PTT device. >> >> A similar approach for implementing this function is ETM, which use >> sysfs for configuring and a character device for dumping data. >> >> Greg has some comments on our implementation and doesn't advocate >> to build driver on debugfs [1]. So I resend this series to >> collect more feedbacks on the implementation of this driver. >> >> Hi perf and ETM related experts, is it suggested to adapt this driver >> to perf? Or is the debugfs approach acceptable? Otherwise use >> sysfs + character device like ETM and use perf tools for decoding it? >> Any comments is welcomed. > > Please use perf. Debugfs / sysfs is not the right place for these things. > ok. > Also, please move your driver to drivers/perf/ > Does it make sense as it's a tuning and tracing device, and doesn't have counters nor do the sampling like usual PMU device under drivers/perf/. > As Alex mentioned, the ETM drivers were initially developed when the AUX > buffer was not available. The sysfs interface is there only for the backward compatibility and for bring up ( due to the nature of the > connections between the CoreSight components and sometimes the missing engineering spec). > got it. thanks for the explanation. Regards, Yicong > Suzuki > > . From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 78C8EC433B4 for ; Mon, 19 Apr 2021 13:23:20 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 DA16A613E9 for ; Mon, 19 Apr 2021 13:23:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA16A613E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=hisilicon.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:CC:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=24g/jOBzzarrt+jb8iav+HcHos50yv+U8U6ux9xjWGk=; b=SbwLDV3KwS6ULIegq7QzvvkED KVkrTnrU6x9XBYcPAjBumSriLE6Alq34nISFPTAKIfKmvQVBEc5RXD9zLmIvxhtvb3fp3WrXsQPYa IE3K4fUwq8XSgPALubPfLX4Y39liw5Ec3gf+VZfWVR6vux1qUm45vPQNtELRPkHoAOwQ6m+FlnGl9 PT7GWu8dU+nWrFaB1MW1/X77K5rML3+vOAo9Fxrfap47Dy1pMoFzVNJt144HkiRBUIgQ82D8sthyr 7EZt9GwcrbUOCRRWzCveo7DCQ5RN+HxTRU9xcmHsb5qf5VvSLtz8jLWj8DPq6r34LmlhWnA4WNt1C ORF4xbwsw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYTql-009xNG-3k; Mon, 19 Apr 2021 13:22:03 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYTqh-009xML-IZ for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 13:21:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:CC:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=f4AgsCWFLcKykK+592omNN7BEPKU2yLaYiyj5XRPAU8=; b=TTSlnAPK4dgJbPyfZnlNtqpCnP SyuKBKT4ZYYSykXXqftVZFDvtFvayDbNcMv1g4jKIqrvtRoq3h6HcQdINN8LUb7J5vJEm1GaTxFBe EdZKf9mxJXcBe/9YCz2KubBkt7qDPD+kFZgFYxattHg07cD8DqjdP9pqRjV8xQie6s0yNdUvegWBg /h4XINDUcVNbP8E0MetXSSpe1PZY/XktmuXj/dgWLpee9SJBTTPz0cxwDhxLlD0m9IqLaWDU1plWC wlnXrCbLBoK1m+7KMiG38g5Xk3Xw4+j6WqnLUK0RiUcAd2lrI/w9IdMMvw5uUEdJHLaiQuyzuCxtC HzDmVwlw==; Received: from szxga07-in.huawei.com ([45.249.212.35]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lYTqb-00BOTc-Jz for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 13:21:58 +0000 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FP6q30PrFz7vwY; Mon, 19 Apr 2021 21:19:27 +0800 (CST) Received: from [127.0.0.1] (10.69.38.196) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Mon, 19 Apr 2021 21:21:38 +0800 Subject: Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device To: Suzuki K Poulose , , , , CC: , , , , , , , , , , , , , , , References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> <529defac-cd67-3a7b-91d3-76eb0bb9dc6c@arm.com> From: Yicong Yang Message-ID: Date: Mon, 19 Apr 2021 21:21:38 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <529defac-cd67-3a7b-91d3-76eb0bb9dc6c@arm.com> X-Originating-IP: [10.69.38.196] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_062153_866806_947B94E7 X-CRM114-Status: GOOD ( 20.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021/4/19 19:17, Suzuki K Poulose wrote: > On 17/04/2021 11:17, Yicong Yang wrote: >> [RESEND with perf and coresight folks Cc'ed] >> >> HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex >> integrated Endpoint (RCiEP) device, providing the capability >> to dynamically monitor and tune the PCIe traffic (tune), >> and trace the TLP headers (trace). >> >> PTT tune is designed for monitoring and adjusting PCIe link parameters. >> We provide several parameters of the PCIe link. Through the driver, >> user can adjust the value of certain parameter to affect the PCIe link >> for the purpose of enhancing the performance in certian situation. > > ... > >> >> The reason for not using perf is because there is no current support >> for uncore tracing in the perf facilities. We have our own format >> of data and don't need perf doing the parsing. The setting through >> perf tools doesn't seem to be friendly as well. For example, >> we cannot count on perf to decode the usual format BDF number like >> ::., which user can use to filter the TLP >> headers through the PTT device. >> >> A similar approach for implementing this function is ETM, which use >> sysfs for configuring and a character device for dumping data. >> >> Greg has some comments on our implementation and doesn't advocate >> to build driver on debugfs [1]. So I resend this series to >> collect more feedbacks on the implementation of this driver. >> >> Hi perf and ETM related experts, is it suggested to adapt this driver >> to perf? Or is the debugfs approach acceptable? Otherwise use >> sysfs + character device like ETM and use perf tools for decoding it? >> Any comments is welcomed. > > Please use perf. Debugfs / sysfs is not the right place for these things. > ok. > Also, please move your driver to drivers/perf/ > Does it make sense as it's a tuning and tracing device, and doesn't have counters nor do the sampling like usual PMU device under drivers/perf/. > As Alex mentioned, the ETM drivers were initially developed when the AUX > buffer was not available. The sysfs interface is there only for the backward compatibility and for bring up ( due to the nature of the > connections between the CoreSight components and sometimes the missing engineering spec). > got it. thanks for the explanation. Regards, Yicong > Suzuki > > . _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel