Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1133940rwb; Sat, 14 Jan 2023 14:57:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXsDmsXhxQ8TWqejOzbBRdeZEu9F189Y93lCylgbHak2K7aOmCgZfUwh4ybAx8EqmeFOCkHg X-Received: by 2002:a17:907:d508:b0:7c1:540c:e214 with SMTP id wb8-20020a170907d50800b007c1540ce214mr7968948ejc.47.1673737065944; Sat, 14 Jan 2023 14:57:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673737065; cv=none; d=google.com; s=arc-20160816; b=MOdradnR9Vgkr5vIn/TX8yWs+bbXrwBUevcwBI2Oxdwf5gQ0JUTh/JFT3/1/XJ1QjG zfsNpJMcZNBQ1yEepR9g1zfTJT/Dycq4fHu0pCfhCYhZmDzwVlyBc8HFGFXt/vQa6eqz +6LzpFWt80OCyjTkkEwXQMidlyu5i3KKCKlwYuuXUiPxIKTnK7gu4DAnAjuqbPJQvM/N BvFl0O2NGPz/NcaL2iz6prZHnbmvx67OjlCNQPS3dikwzTfse8RvH5INBvtvAQ2HZwjf Auo4shHiiLd7tbzN2Zn1Nm/1QEjsb5wHAtlhj79x0CO4zDM6zWuPn4dhQ4EnB3B63b9T S6UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=nYgARAkWs9iZ0B/4FRwpMpPs9S0XV3huLCtOhLAUC8Y=; b=wI40a7OXiyFmzXa3ir5UB3URFvegnqTMDZEnIs3xhdhnDQQYql+QETL5r+gDDbOIav ApHaUxXk1+0Cx5j04lLiWFRl3qQZJquSXYf4v6SVqKNaTD7BimKA7kWjUx04eqcOLqlM lReb8TMwqbw8ZVGdQMI4RvMhwui8CiJP2JQvoOCKNYoXylffhwrdL3p2dzGoq1KPOO/y VR488ocaMPS0/Lowuzy56MZw80PZOJ7xNRl3zX+1DOlXYxPp+4xX+8Yb2FnZIvOy6zfS Kxy3thsFf4jRCBuKoxiwyzlHfD1qMXhuAC0k5fzi0pYosWq1rKbEzsc0/efV9nwtfnl4 zj4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=Ds1XNBqg; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du1-20020a17090772c100b007c0a8ff3384si1483621ejc.763.2023.01.14.14.57.32; Sat, 14 Jan 2023 14:57:45 -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; dkim=pass header.i=@google.com header.s=20210112 header.b=Ds1XNBqg; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230429AbjANWkr (ORCPT + 53 others); Sat, 14 Jan 2023 17:40:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbjANWkp (ORCPT ); Sat, 14 Jan 2023 17:40:45 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01327BB86 for ; Sat, 14 Jan 2023 14:40:43 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id r9so1368246wrw.4 for ; Sat, 14 Jan 2023 14:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nYgARAkWs9iZ0B/4FRwpMpPs9S0XV3huLCtOhLAUC8Y=; b=Ds1XNBqgWBP3mtifRGvLh1owkfZbiDW4h5dggRxSHpmJ9J2KOfn/ZCCvW0yQYjw7t2 BrB0oOoRzRcraQqleGmC+Mfg3hVBklyxNEiR38vK7o35DUoOnVHsDOLoGoetmLvmvGXP Dc5qNQRLBi6JMugRudC6hv7Ei7YlQCQ2jVXeYk0xl7KzfmjHgEJDK7n9gIPtgpwbreqi 2rEySAnXmZ5CT5v6V45TREUuqDoQe3nmLgAb7HvWyPO8LunM1+DlK8f8choZ4DB2FNcO OR1PSQ4yGCrITZaDbs495MdLLHG75+cv4jb21A6M966VabvXDlr4+glAmt9yJmEdZbzQ fwuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nYgARAkWs9iZ0B/4FRwpMpPs9S0XV3huLCtOhLAUC8Y=; b=5sHLqZsj5gQy5XuFspAqdZUKEyskbV5dqr+MmuFab/llzotiN0mA3ujd4NAzo8a9/P VOeNZdNmqjMc+tu2nynEl/XRiXhxnJz2ivsuxKPzIjaT84nYlWLllxC4m7i8ED3v7o36 T/WzkdPjofcgknGm0qo4xhzKQRx0rGpy70prB76/ZB71c2z02Jeg2WQkm5+6hlhCkd4w bNIltJxafFiiDE6M9QYzHNjXYxlRSCbHRVcQxn4KFgiXO9xw8/AVJdTzbxjQ967N8JUQ XqpOy7pdbarwu4tf/ERcMTvEhBFQxTHVNU30LvTSVvxYwaSuECJk/X+ZF2DGeOu33a9w 61Lw== X-Gm-Message-State: AFqh2kqA0h6D24X2anWT93JsYpe80IzKKNPhDw1X6dn1YYwHn1CImN/m j1eqDNbdm+h0b+m8DZwhzRQER4lFxcXx4C19xtR2XA== X-Received: by 2002:a5d:614d:0:b0:2bc:7ed4:cd50 with SMTP id y13-20020a5d614d000000b002bc7ed4cd50mr964423wrt.40.1673736042305; Sat, 14 Jan 2023 14:40:42 -0800 (PST) MIME-Version: 1.0 References: <1673601740-122788-1-git-send-email-renyu.zj@linux.alibaba.com> <7498a6b1-01d0-0e12-82d3-c75250e09161@linux.alibaba.com> In-Reply-To: <7498a6b1-01d0-0e12-82d3-c75250e09161@linux.alibaba.com> From: Ian Rogers Date: Sat, 14 Jan 2023 14:40:30 -0800 Message-ID: Subject: Re: [PATCH v7 0/9] Add metrics for neoverse-n2-v2 To: Jing Zhang 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,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 On Fri, Jan 13, 2023 at 8:32 AM Jing Zhang wro= te: > > > > =E5=9C=A8 2023/1/13 =E4=B8=8B=E5=8D=885:59, John Garry =E5=86=99=E9=81=93= : > > 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/1673017= 529-1429208-1-git-send-email-renyu.zj@linux.alibaba.com/__;!!ACWV5N9M2RV99h= Q!LhBq67uDCOsz1k7ZF4aQPHF0Bp8FsMr-ZNgCnBSUKF4qJTFODfnkId7lw_NXqB4qZUCpu-jbY= 8z8LTckoqFGz2Q8bA$ > > > > 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 =3D 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 Thanks, Ian