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 2E1C5C433ED for ; Mon, 19 Apr 2021 11:19:59 +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 A89FA61029 for ; Mon, 19 Apr 2021 11:19:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A89FA61029 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.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-Type: Content-Transfer-Encoding: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=FaewCqEdKR1nVXJ51WbXD5fqDaNcwH+x1CVOANFlLm4=; b=gwz/h6hb7u1UTD9H9+8V8gZZs 5D6w4+8EBbq4WdsW7SkzCguYxF3O2uHfAHtWdjMkOjJJwwkNfuL65pAJsew4OtAI4zd27+iFZ3Q1P a6Azr2758OLfvo5qrdhXc3YzFtI5wUH7v8hC0P4hsevSgy094FMz3/I9ZMb1mtHICmOKYB4nIWdSW zjGw0CZRCcwKqrMsNumxUJjsE/GWmyqSZFIaoD8cWqpd/8kI5qw1z7YbOigISZW9Whg8onWg6vHo+ Z/gCRfEsMAgt1h6hLO1jHiXqX5MxAFvpE3akCYnMwORpUGAhnUiEhxhRYvNeotMCI0ZxEFi6aoS6i YNojL7TLA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYRuj-009kLi-9e; Mon, 19 Apr 2021 11:18:01 +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 1lYRug-009kLZ-LX for linux-arm-kernel@desiato.infradead.org; Mon, 19 Apr 2021 11:17:58 +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=cIzRB71xvzcRsSPRqWHgzN9DiE2u1vNbfWMZU4JvZts=; b=sHfawvchecWs4vMtEvZ5RebjiT p5TNoGCD3P8lmW+YOcMFxWo7jBmT/NlCvxnM70Fz16CaOYAMKpRHzBY8x8uFknbrCpVgdKXcjrrW5 BjCWPSAxQQzKc352YckB2bzNz7JVTrHhSHuUiK7MmXCoa1fUq97KlToMs/3KZpdRMt4BWJaWKw7WH FqCjeu5MhK2iEs0eqTsSaTyBpgCRCymhhRv3UVVV8kBq4vWnUIzOCoOUlgaBH7W5bLP6YVCJS5rHz G89l5eaLnStGLfs/JnpI25SKWfXlZLJ5Vp0vovLJh+sba0qZMzfm6X01hgfFk15zjhMu9ZLH95j4/ tZubPp+g==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lYRud-00BIjm-Bm for linux-arm-kernel@lists.infradead.org; Mon, 19 Apr 2021 11:17:56 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 431B031B; Mon, 19 Apr 2021 04:17:46 -0700 (PDT) Received: from [10.57.66.181] (unknown [10.57.66.181]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3C2623F792; Mon, 19 Apr 2021 04:17:43 -0700 (PDT) Subject: Re: [PATCH RESEND 0/4] Add support for HiSilicon PCIe Tune and Trace device To: Yicong Yang , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, linux-pci@vger.kernel.org Cc: alexander.shishkin@linux.intel.com, helgaas@kernel.org, gregkh@linuxfoundation.org, lorenzo.pieralisi@arm.com, will@kernel.org, mark.rutland@arm.com, mathieu.poirier@linaro.org, mike.leach@linaro.org, leo.yan@linaro.org, jonathan.cameron@huawei.com, song.bao.hua@hisilicon.com, john.garry@huawei.com, prime.zeng@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com, linuxarm@huawei.com References: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> From: Suzuki K Poulose Message-ID: <529defac-cd67-3a7b-91d3-76eb0bb9dc6c@arm.com> Date: Mon, 19 Apr 2021 12:17:41 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 In-Reply-To: <1618654631-42454-1-git-send-email-yangyicong@hisilicon.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210419_041755_481717_C012CE4D X-CRM114-Status: GOOD ( 22.78 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Also, please move your driver to 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). Suzuki _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel