Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Yicong Yang <yangyicong@huawei.com>
Cc: jonathan.cameron@huawei.com, mark.rutland@arm.com,
	linux-arm-kernel@lists.infradead.org, yangyicong@hisilicon.com,
	hejunhao3@huawei.com, linuxarm@huawei.com,
	wangyushan12@huawei.com, prime.zeng@hisilicon.com
Subject: Re: [PATCH v4 08/10] drivers/perf: hisi: Export associated CPUs of each PMU through sysfs
Date: Mon, 9 Dec 2024 15:48:30 +0000	[thread overview]
Message-ID: <20241209154830.GC12428@willie-the-truck> (raw)
In-Reply-To: <20241203125049.39458-9-yangyicong@huawei.com>

On Tue, Dec 03, 2024 at 08:50:47PM +0800, Yicong Yang wrote:
> From: Yicong Yang <yangyicong@hisilicon.com>
> 
> Although the event of the uncore PMU can only be opened on a single
> CPU, some PMU does have the affinity on a range of CPUs. For example
> the L3C PMU is associated to the CPUs sharing the L3T it monitors.
> Users may infer this affinity by the PMU name which may have SCCL ID
> and CCL ID encoded (for L3C etc), but it's not that straightforward.
> So export this information by adding an "associated_cpus" sysfs
> attribute then user can get this directly.
> 
> Reviewed-by: Jonathan Cameron <Joanthan.Cameron@huawei.com>
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> ---
>  Documentation/admin-guide/perf/hisi-pmu.rst |  5 ++++-
>  drivers/perf/hisilicon/hisi_uncore_pmu.c    | 10 ++++++++++
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/admin-guide/perf/hisi-pmu.rst b/Documentation/admin-guide/perf/hisi-pmu.rst
> index 5cc248d18c63..48992a0b8e94 100644
> --- a/Documentation/admin-guide/perf/hisi-pmu.rst
> +++ b/Documentation/admin-guide/perf/hisi-pmu.rst
> @@ -35,7 +35,10 @@ e.g. hisi_sccl1_hha0/rx_operations is RX_OPERATIONS event of HHA index #0 in
>  SCCL ID #1.
>  
>  The driver also provides a "cpumask" sysfs attribute, which shows the CPU core
> -ID used to count the uncore PMU event.
> +ID used to count the uncore PMU event. An "associated_cpus" sysfs attribute is
> +also provided to show the CPUs associated with this PMU. The "cpumask" indicates
> +the CPUs to open the events, usually as a hint for userspaces tools like perf.
> +It only contains one associated CPU from the "associated_cpus".

What is userspace expected to do with this information? Can you point me
to patches that add the corresponding support to the 'perf' tool, please?

Will


  reply	other threads:[~2024-12-09 15:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-03 12:50 [PATCH v4 00/10] Refactor the common parts to the HiSilicon Uncore PMU core and cleanups Yicong Yang
2024-12-03 12:50 ` [PATCH v4 01/10] drivers/perf: hisi: Define a symbol namespace for HiSilicon Uncore PMUs Yicong Yang
2024-12-03 12:50 ` [PATCH v4 02/10] drivers/perf: hisi: Don't update the associated_cpus on CPU offline Yicong Yang
2024-12-03 12:50 ` [PATCH v4 03/10] drivers/perf: hisi: Migrate to one online CPU if no associated one online Yicong Yang
2024-12-03 12:50 ` [PATCH v4 04/10] drivers/perf: hisi: Refactor the detection of associated CPUs Yicong Yang
2024-12-03 12:50 ` [PATCH v4 05/10] drivers/perf: hisi: Extract topology information to a separate structure Yicong Yang
2024-12-03 12:50 ` [PATCH v4 06/10] drivers/perf: hisi: Add a common function to retrieve topology from firmware Yicong Yang
2024-12-03 12:50 ` [PATCH v4 07/10] drivers/perf: hisi: Provide a generic implementation of cpumask/identifier Yicong Yang
2024-12-03 12:50 ` [PATCH v4 08/10] drivers/perf: hisi: Export associated CPUs of each PMU through sysfs Yicong Yang
2024-12-09 15:48   ` Will Deacon [this message]
2024-12-10 10:49     ` Yicong Yang
2024-12-10 11:39       ` Will Deacon
2024-12-10 13:02         ` Yicong Yang
2024-12-03 12:50 ` [PATCH v4 09/10] drivers/perf: hisi: Fix incorrect variable name "hha_pmu" in DDRC PMU driver Yicong Yang
2024-12-03 12:50 ` [PATCH v4 10/10] drivers/perf: hisi: Delete redundant blank line of DDRC PMU Yicong Yang
2024-12-10 12:05 ` [PATCH v4 00/10] Refactor the common parts to the HiSilicon Uncore PMU core and cleanups Will Deacon
2024-12-10 13:04   ` Yicong Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209154830.GC12428@willie-the-truck \
    --to=will@kernel.org \
    --cc=hejunhao3@huawei.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=wangyushan12@huawei.com \
    --cc=yangyicong@hisilicon.com \
    --cc=yangyicong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox