Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14714419rwd; Sun, 25 Jun 2023 03:03:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ49CR2tvwCPEoOucLZq+JKj6frk8TiEjmzIQ9UEbvD9UmfGkM94SUOoUR0Q/eNCTONSl1j3 X-Received: by 2002:a9d:7a97:0:b0:6b1:f1e0:a89 with SMTP id l23-20020a9d7a97000000b006b1f1e00a89mr21650745otn.31.1687687433824; Sun, 25 Jun 2023 03:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687687433; cv=none; d=google.com; s=arc-20160816; b=jMWeIQo+agJomieJzJBLjug82mhsyJk+MlbIhzskIhUsJ6CLEk2CmyT8+Emvf+fAOY KRSREVjMGCe/u2gkGnNZvcAgNkviNz4pSoPuNjmuuWLycJg1KXcVAq6umu4A9xmdBrrD 0gR9M9QQLAyJr7Zrojwb19jWFOZ6Yl2057HrOFPrdUumKUy1McGcZfUu1rs492NBIci6 9FCF5lsajX6dEnTUAu7eZQrPL9ZaJkq+IqQoaFpR1gxajsVh4LsyW9nvyYMbkRRMdPIU HRpY05egiop6SJ9Sj61WomD5qcsf3NAzKJIMzEAgMT/6+kYxARRCJIxdx2I/oB9ZwiR2 cmVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=nIdFkXV/nVl6w+EB6/tadTRtTLeP7wxSceRwdjT6dd0=; fh=VO9pbCCDZ79EvkYtKw4FMsCqQHO/+t+AqbJzqA4kf74=; b=QmBIsK6BZnsdkk73o6xOuwDZk62JuqQN2kjkn8uVvB1pfXMS0u7nA2bFJlVN5MZ35M W4HqttwQe6LkVBGuN/rAQyXOCR22th1c05VsF4h83C0okqFKNnoGGcAyyev+x8rCbiES rp8nuZbnmmya1hTst9dx67pf7cLjJcmdl5TngSz0UksC0UtI4EUHOGeo0cBrQ7FcFjMd f+qV9nw6d9p7uj7PJB/N5vnPlQHi+NHwi/NYO+A7/1C4H4trBlVk/ghymsI7rSNusq/I 9QXVysHwyS6Y9uI2UOAHPMimAR0LHvu/GdxLm78ug1i8KpLnEVBsY2db5RBLkOjPBsMV slvg== 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=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j4-20020a056a00174400b0066a5ec2bda4si2904052pfc.325.2023.06.25.03.03.42; Sun, 25 Jun 2023 03:03:53 -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=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbjFYI7B (ORCPT + 99 others); Sun, 25 Jun 2023 04:59:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230362AbjFYI67 (ORCPT ); Sun, 25 Jun 2023 04:58:59 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01EE7103; Sun, 25 Jun 2023 01:58:57 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0Vlrm5fd_1687683530; Received: from 30.120.140.216(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0Vlrm5fd_1687683530) by smtp.aliyun-inc.com; Sun, 25 Jun 2023 16:58:52 +0800 Message-ID: Date: Sun, 25 Jun 2023 16:58:48 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v4 0/4] Add JSON metrics for Yitian710 DDR To: Namhyung Kim Cc: Will Deacon , Mark Rutland , Jonathan Corbet , John Garry , Shuai Xue , Ian Rogers , Robin Murphy , James Clark , Mike Leach , Leo Yan , Ilkka Koskinen , Alexander Shishkin , Jiri Olsa , Adrian Hunter , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-doc@vger.kernel.org, Zhuo Song References: <1687245156-61215-1-git-send-email-renyu.zj@linux.alibaba.com> From: Jing Zhang In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/6/21 下午1:00, Namhyung Kim 写道: > On Tue, Jun 20, 2023 at 8:08 PM Jing Zhang wrote: >> >> >> >> 在 2023/6/21 上午3:04, Namhyung Kim 写道: >>> Hello, >>> >>> On Tue, Jun 20, 2023 at 12:17 AM Jing Zhang wrote: >>>> >>>> Hi all, >>>> >>>> I add an identifier sysfs file for the yitian710 SoC DDR to allow >>>> userspace to identify the specific implementation of the device, >>>> so that the perf tool can match the corresponding uncore events and >>>> metrics through the identifier. Then added yitian710 SoC DDR >>>> metrics and events alias. >>>> >>>> Change since v3: >>>> - Split the CMN and ali_drw patches. This patchset only contains >>>> ali_drw PMU related patches. The CMN metric related patches will >>>> be in another patchset. >>>> - Link: https://lore.kernel.org/all/1685438374-33287-1-git-send-email-renyu.zj@linux.alibaba.com/ >>>> >>>> $perf list: >>>> ... >>>> ali_drw: >>>> chi_rxdat >>>> [A packet at CHI RXDAT interface (write data). Unit: ali_drw] >>>> chi_rxrsp >>>> [A packet at CHI RXRSP interface. Unit: ali_drw] >>>> chi_txdat >>>> [A packet at CHI TXDAT interface (read data). Unit: ali_drw] >>>> chi_txreq >>>> [A packet at CHI TXREQ interface (request). Unit: ali_drw] >>>> cycle >>>> [The ddr cycle. Unit: ali_drw] >>>> ... >>>> ali_drw: >>>> ddr_read_bandwidth.all >>>> [The ddr read bandwidth(MB/s). Unit: ali_drw ] >>>> ddr_write_bandwidth.all >>>> [The ddr write bandwidth(MB/s). Unit: ali_drw ] >>>> ... >>>> >>>> $perf stat -M ddr_read_bandwidth.all ./test >>>> >>>> Performance counter stats for 'system wide': >>>> >>>> 38,150 hif_rd # 2.4 MB/s ddr_read_bandwidth.all >>>> 1,000,957,941 ns duration_time >>>> >>>> 1.000957941 seconds time elapsed >>>> >>>> Jing Zhang (4): >>>> driver/perf: Add identifier sysfs file for Yitian 710 DDR >>>> perf jevents: Add support for Yitian 710 DDR PMU aliasing >>>> perf vendor events: Add JSON metrics for Yitian 710 DDR >>>> docs: perf: Update metric usage for Alibaba's T-Head PMU driver >>> >>> So patch 1 is for the kernel, and patch 2-4 depend on it, right? >>> >> >> Hi Namhyung, >> >> Yes, patch 2-4 depend on patch 1. >> >>> I'm curious why the first patch is needed, presumably the PMU >>> should have 'ali_drw' in the name already. Do we use substring >>> match for the compat name in the JSON metric? >>> >> >> The main purpose of patch 1 is to add an identifier so that the Compat >> field can match the corresponding event when defining aliases or metrics >> for events. >> >> For example, "Unit" can match "ali_drw" in the name and different SoCs may >> be able to match ali_drw, but they may have different events, and even if >> the events are the same, the meanings may be different. Therefore, the >> Compat field is needed to match the Identifier to confirm which type and >> revision of PMU the current SoC has. Therefore, both "Unit" and "Compat" >> need to be matched at the same time. Although it seems that ali_drw is >> redundantly matched currently, it is meaningful for future expansion. > > I see, thanks for the explanation. > > I think you need to route the kernel patch differently. I can apply the tools > part once the kernel patch gets Acks from others. > Ok, Thank you. Thanks, Jing > Thanks, > Namhyung