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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38DE3C7EE2F for ; Fri, 9 Jun 2023 06:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbjFIGBY (ORCPT ); Fri, 9 Jun 2023 02:01:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjFIGBF (ORCPT ); Fri, 9 Jun 2023 02:01:05 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CABDD3580 for ; Thu, 8 Jun 2023 23:01:03 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-33bf12b5fb5so195655ab.1 for ; Thu, 08 Jun 2023 23:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686290463; x=1688882463; 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=s1nqF1EW9Xw6Dg19Y4kVDXlrr3m8WKbMsDEM6/70bgY=; b=k2CEB0SGwTwhin1kamQE/wXQGaNH0+meO2IKlg5S6EzlpcruYynoyzp3ohB0AHEqtb HxFsBAgGf4E0n8KU/snK6QzdG4OqTQb6ebGmmYGuWo+gFULNTaOGNx2ILwTRYlZqE4jR jb7gi//8LpYHMgPM8Q0i3R8YxiJUjHtRp1iJTDkt08zYa4Xu7gud8Q9XZX8rVar9sJkm FYwzz+NRCC9RKnK17YzaGuDOGACFtd9DHvH/v9tXm/gM3pxABXGIciuj4TXQjffIf1qT ZQVmPDjvSdzJKsbdNQxWx/S+0JG3WlpFO4FFGgl684VsgdJHTE90/3vg1jZxHy7RDX3I OP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686290463; x=1688882463; 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=s1nqF1EW9Xw6Dg19Y4kVDXlrr3m8WKbMsDEM6/70bgY=; b=UTqzO2F9yJz+wG0oa+n2Q7oKs2q2rSzDrhd3nKpz5sXu8QpF7zD35x1pVEt3G1wm7q YDuW3Fqr1kWifzOFb2a1mJ8uGuyd48Y0mT1502hMJBvh4Bz5glprkas+khqvQj4Kvz/C +VcmSjgTqDxZ87YoEld2no4VOiaBlVxdn/vnAOqFel7UP5x4qdNtwl2ug3yKZI7TwP6m Q1raHCuEwkUdlo95ViQVUTE5sP7Ss6eobLquV1yUODmveu52s6uA+eEz6WjowthCf/cL jWnxVlazbMYY11pnWLm4urQOz6fDGVSENOutgnOEKvsD58zwEROyjOZEy24xNla3Y6R4 gZEg== X-Gm-Message-State: AC+VfDxF75LXeTz9kAlm605bAIA7RLCAh84uWeoDKeanG1OmZyXCZPjp Y4eXvCuNv7iV/X2toEKUiALbOVtbM4xfFCpJHU0yig== X-Google-Smtp-Source: ACHHUZ7dVUka4OPg6SfqOs8yDq7/jTgCdNEXoF+87TD50HzODl4fZSvEWLI2DQ1dUK/hdVt2lS7kq1IG78+abovEohM= X-Received: by 2002:a05:6e02:214a:b0:32a:f2a9:d1b7 with SMTP id d10-20020a056e02214a00b0032af2a9d1b7mr293623ilv.10.1686290463021; Thu, 08 Jun 2023 23:01:03 -0700 (PDT) MIME-Version: 1.0 References: <20230527072210.2900565-1-irogers@google.com> <20230527072210.2900565-29-irogers@google.com> <7c7d9279-25b0-328e-af41-66c2096febaa@amd.com> <8a642886-89e0-b43f-d7fb-6831519ee62a@amd.com> In-Reply-To: <8a642886-89e0-b43f-d7fb-6831519ee62a@amd.com> From: Ian Rogers Date: Thu, 8 Jun 2023 23:00:51 -0700 Message-ID: Subject: Re: [PATCH v5 28/34] perf pmus: Split pmus list into core and other To: Ravi Bangoria Cc: Suzuki K Poulose , Mike Leach , Leo Yan , John Garry , Will Deacon , James Clark , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Kajol Jain , Jing Zhang , Kan Liang , Zhengjun Xing , Madhavan Srinivasan , Athira Rajeev , Ming Wang , Huacai Chen , Sandipan Das , Dmitrii Dolgov <9erthalion6@gmail.com>, Sean Christopherson , Ali Saidi , Rob Herring , Thomas Richter , Kang Minchul , linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Thu, Jun 8, 2023 at 10:55=E2=80=AFPM Ravi Bangoria wrote: > > On 09-Jun-23 11:05 AM, Ian Rogers wrote: > > On Thu, Jun 8, 2023 at 10:30=E2=80=AFPM Ravi Bangoria wrote: > >> > >> On 09-Jun-23 10:10 AM, Ian Rogers wrote: > >>> On Thu, Jun 8, 2023 at 9:01=E2=80=AFPM Ravi Bangoria wrote: > >>>> > >>>> Hi Ian, > >>> > >>> Hi Ravi, > >>> > >>>> On 27-May-23 12:52 PM, Ian Rogers wrote: > >>>>> Split the pmus list into core and other. This will later allow for > >>>>> the core and other pmus to be populated separately. > >>>>> > >>>>> Signed-off-by: Ian Rogers > >>>>> Reviewed-by: Kan Liang > >>>>> --- > >>>>> tools/perf/util/pmus.c | 52 ++++++++++++++++++++++++++++++--------= ---- > >>>>> 1 file changed, 38 insertions(+), 14 deletions(-) > >>>>> > >>>>> diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c > >>>>> index 58ff7937e9b7..4ef4fecd335f 100644 > >>>>> --- a/tools/perf/util/pmus.c > >>>>> +++ b/tools/perf/util/pmus.c > >>>>> @@ -12,13 +12,19 @@ > >>>>> #include "pmu.h" > >>>>> #include "print-events.h" > >>>>> > >>>>> -static LIST_HEAD(pmus); > >>>>> +static LIST_HEAD(core_pmus); > >>>>> +static LIST_HEAD(other_pmus); > >>>> > >>>> AMD ibs_fetch// and ibs_op// PMUs are per SMT-thread and are indepen= dent of > >>>> core hw pmu. I wonder where does IBS fit. Currently it's part of oth= er_pmus. > >>>> So, is it safe to assume that other_pmus are not just uncore pmus? I= n that > >>>> case shall we add a comment here? > >>> > >>> I'm a fan of comments. The code has landed in perf-tools-next: > >>> https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/t= ools/perf/util/pmus.c?h=3Dperf-tools-next > >>> Do you have any suggestions on wording? I've had limited success > >>> adding glossary terms, for example, offcore vs uncore: > >>> https://perf.wiki.kernel.org/index.php/Glossary#Offcore > >>> I think offcore is a more interconnect related term, but I'd prefer > >>> not to be inventing the definitions. I'd like it if we could be less > >>> ambiguous in the code and provide useful information on the wiki, so > >>> help appreciated :-) > >> > >> Does this look good? > >> > >> /* > >> * core_pmus: A PMU belongs to core_pmus if it's name is "cpu" or it'= s sysfs > >> * directory contains "cpus" file. All PMUs belonging to c= ore_pmus > >> * must have pmu->is_core=3D1. If there are more than one = PMUs in > >> * this list, perf interprets it as a heterogeneous platfo= rm. > > > > > > Looks good but a nit here. It is heterogeneous from point-of-view of > > PMUs, there are ARM systems where they are heterogenous with big an> li= ttle cores but they have a single homogeneous PMU driver. The perf > > tool will treat them as homogeneous. > > In that case number of entries in core_pmus list would still be 1 right? Right. Heterogeneous platform, homogeneous PMU, single core PMU. Thanks, Ian > Thanks, > Ravi