Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2620511rwb; Sun, 15 Jan 2023 19:12:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVtgYcaOyi25PamAibK+57tNNxrVs/ySh/fjEYZmBcQ54j4wkMxNcGvNIQV5l4obTgaRvs X-Received: by 2002:a17:902:8688:b0:189:77c1:b5a7 with SMTP id g8-20020a170902868800b0018977c1b5a7mr83891906plo.41.1673838777739; Sun, 15 Jan 2023 19:12:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673838777; cv=none; d=google.com; s=arc-20160816; b=0irzoOOlWYcujpbk5FGQFG+LLtsvlAEdfv95ADnKojLWVsRcPU0H+ZssSY1OrhiKqX nEhodZaZiOelfc5CA64rfFJm+JvWepj9a81wSd3ZXfqCvJ7rKLczBDo77V+rtGQgfYHH hXQ8ePGwDQpg7joPoqDSNVdxb6fvMfHYH/Ru56ugOBs5t5LZROTw0h1BxzPHrHntAowv aYEXrJBtY+y2L43e5EyM8V7LjNomVp0msvlyexXMCzu3Xb954XCX6s3Oiz8x8ZNMoLui h5EKDkxcxMtdOYuKULp/NjZ35T9rywY/okTUaXRsfE16qbtcrOPlJl6clMr3Lk1ma73W ITvg== 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=1AU1pEik0aZjQGWKDjY/r4XoCqpaS1ZYCjrj8X3R2fM=; b=SiNQEZmdun8lh+e6t2e8cAbRYI3NKPReQ/vXIzNoLbml4sK2WasHI3qPGDtAfIVSHx buAwUxLVCG80lf1hkw8iAlLaPlEs2UGSNen+JBR+9mogiQnFxh3bTveNDTHxvUaJKCwP HXFjQzeJNLetEzLODT2KgGUmYjvwwT4aZ5kd1tYkOtDcYc3OU8Tc6RFibmi5iFztvyNv j9E+xM/0+ZtOoSBG8PRvKsDW7zLDCXZrJaoVSswQYtrb+hRCSHsXvCcrfnq6CCnomRwY zGcA85FC0qgAepfGGSrNhx7keaJLE5R8qRDJjJ6iGsG+3BVNwOkwboSNxN9ajeK8UlR8 WHGw== 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 s28-20020a63525c000000b004c7e162a4a6si5864935pgl.483.2023.01.15.19.12.51; Sun, 15 Jan 2023 19:12:57 -0800 (PST) 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 S231755AbjAPC7U (ORCPT + 52 others); Sun, 15 Jan 2023 21:59:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231740AbjAPC7R (ORCPT ); Sun, 15 Jan 2023 21:59:17 -0500 Received: from out30-1.freemail.mail.aliyun.com (out30-1.freemail.mail.aliyun.com [115.124.30.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAA577A94; Sun, 15 Jan 2023 18:59:14 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=renyu.zj@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0VZbc4Zt_1673837948; Received: from 30.221.147.208(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZbc4Zt_1673837948) by smtp.aliyun-inc.com; Mon, 16 Jan 2023 10:59:09 +0800 Message-ID: Date: Mon, 16 Jan 2023 10:59:07 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v7 0/9] Add metrics for neoverse-n2-v2 To: Ian Rogers Cc: John Garry , Xing Zhengjun , Will Deacon , James Clark , Mike Leach , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andrew Kilroy , Shuai Xue , Zhuo Song References: <1673601740-122788-1-git-send-email-renyu.zj@linux.alibaba.com> <7498a6b1-01d0-0e12-82d3-c75250e09161@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=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, 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/1/15 上午6:40, Ian Rogers 写道: > On Fri, Jan 13, 2023 at 8:32 AM Jing Zhang wrote: >> >> >> >> 在 2023/1/13 下午5:59, John Garry 写道: >>> On 13/01/2023 09:22, Jing Zhang wrote: >>>> Changes since v6: >>>> - Split patch #1 into 3 smaller patches as suggested by Ian. >>>> - Change perf_pmu__get_slots into perf_pmu__cpu_slots_per_cycle, >>>> per John's suggestion; >>>> - Return NAN instead of 0 in perf_pmu__cpu_slots_per_cycle weak >>>> function, per John's suggestion; >>>> - Factor out pmu_core__find_same function, per John's suggestion. >>>> - Link:https://urldefense.com/v3/__https://lore.kernel.org/all/1673017529-1429208-1-git-send-email-renyu.zj@linux.alibaba.com/__;!!ACWV5N9M2RV99hQ!LhBq67uDCOsz1k7ZF4aQPHF0Bp8FsMr-ZNgCnBSUKF4qJTFODfnkId7lw_NXqB4qZUCpu-jbY8z8LTckoqFGz2Q8bA$ >>> >>> This looks fine. But for this code: >>> >>> On 13/01/2023 09:22, Jing Zhang wrote: >>>> +double perf_pmu__cpu_slots_per_cycle(void) >>>> +{ >>>> + char path[PATH_MAX]; >>>> + unsigned long long slots = 0; >>> >>> I would prefer if this returned NAN (and not 0) for when we can't find a pmu or the value from ./caps/slots is zero, but I am not going to get too hung up on that. >>> >> >> Ok, I like this way too. >> >>> For series: >>> >>> Reviewed-by: John Garry >> >> Thank you very much indeed! > > Aside a naming nit in 1/9 for series: > > Acked-by: Ian Rogers > Thank you sincerely! > Thanks, > Ian