Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1170586rwb; Fri, 13 Jan 2023 08:45:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXvi4Kb+iO+OjA/LyWcUqVXU0MwAASynbx+Ka6s/2i06ff5sk8POMe0p4QzgspDBruiH1SmV X-Received: by 2002:a17:906:fb17:b0:86a:addf:880a with SMTP id lz23-20020a170906fb1700b0086aaddf880amr2697097ejb.65.1673628317471; Fri, 13 Jan 2023 08:45:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673628317; cv=none; d=google.com; s=arc-20160816; b=LUz11lo0u05fm/6sU9yFC2S0IuYwnqe02Ah8B3BVkgh7J7wZcFyOE9FGT2TZasyHYh DCuJKCE82Fpf03GQes30DqxfygowRKrD4HThhDxSsEIDnWxgOQyUo3fBMMo8vRTVLFEa ZkMF08Bna2DWu/5Tj3KrjFB7Sbud71+V7SEKd198J1QKSvkqGnK6lQMFc9zMNelQh/Nt G7ObVe3nu14B4dd4wpx4QwOmTUSggqRQkD5f3JKRGr1nrvLYAs6kBI3JHrjzoYEnnxgp XXJ7mR0v5TPo9gvauqThcPCos7YpEBAI4FxPW16W/oiKjvgjplPfPvxhVFANz67wXVB1 zidA== 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=ioTL0IJUCDsCk5t0Pw3SKDqr/Gs1/ZQIHUdb8CD6c1o=; b=lKzxK5WT7+tyGNTwDn2PLgakxUYok+X31m25G/4IcxFOyFhegFCrQ8NGNpNFCzhCdE qooXfG0gA0GtqcMZBO4Tkl3KBNImLeIWFxEmqYuEGA4d24WxOeTZvmLfCXrRQ6s5I0M/ J3QwOTjcGwNYaw8FJOYx7yRmdY5Fn4U3jR6XaHOFTK+xLP6SnpovSg1EU3DH/AufReP0 05N6IwahBqoMlRCnNR8V1Cw8jLkXnePq9pzlHwaVVs6IfShxEvWPnfkPk4sC6GpDeas7 6L2KOQGrkAGtixKcL1tMYq0gM62DO1razHkJADQvH/GrBOzPZCoOCK6nNFamGDfbhoO5 zUww== 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 nc13-20020a1709071c0d00b0084d3d661a08si19281638ejc.24.2023.01.13.08.45.05; Fri, 13 Jan 2023 08:45:17 -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 S230336AbjAMQhh (ORCPT + 51 others); Fri, 13 Jan 2023 11:37:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjAMQhG (ORCPT ); Fri, 13 Jan 2023 11:37:06 -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 D5F14EAB; Fri, 13 Jan 2023 08:32:56 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R271e4;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_---0VZVSZBb_1673627569; Received: from 30.15.250.25(mailfrom:renyu.zj@linux.alibaba.com fp:SMTPD_---0VZVSZBb_1673627569) by smtp.aliyun-inc.com; Sat, 14 Jan 2023 00:32:51 +0800 Message-ID: <7498a6b1-01d0-0e12-82d3-c75250e09161@linux.alibaba.com> Date: Sat, 14 Jan 2023 00:32:49 +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: John Garry , Ian Rogers Cc: 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> 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,RCVD_IN_MSPIKE_H2,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/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!