All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Gupta <sumitg@nvidia.com>
To: Pengjie Zhang <zhangpengjie2@huawei.com>,
	catalin.marinas@arm.com, will@kernel.org, rafael@kernel.org,
	lenb@kernel.org, robert.moore@intel.com, beata.michalska@arm.com,
	zhenglifeng1@huawei.com, zhanjie9@hisilicon.com,
	cuiyunhui@bytedance.com
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	acpica-devel@lists.linux.dev, linuxarm@huawei.com,
	jonathan.cameron@huawei.com, prime.zeng@hisilicon.com,
	wanghuiqiang@huawei.com, xuwei5@huawei.com, lihuisong@huawei.com,
	yubowen8@huawei.com, wangzhi12@huawei.com,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 0/2] CPPC: reduce FFH feedback-counter sampling skew on arm64
Date: Mon, 29 Jun 2026 21:24:47 +0530	[thread overview]
Message-ID: <16c7c5d4-d596-4a75-ac97-fb9d2c02c80c@nvidia.com> (raw)
In-Reply-To: <20260410094145.4132082-1-zhangpengjie2@huawei.com>


On 10/04/26 15:11, Pengjie Zhang wrote:
> External email: Use caution opening links or attachments
>
>
> The legacy CPPC feedback-counter path reads the delivered and reference
> performance counters separately.
>
> On arm64 systems using AMU-backed CPPC FFH counters, each FFH read is
> served through a cross-CPU counter read helper. Reading the counters
> separately therefore widens the sampling window between them and can
> skew the delivered/reference ratio used by cpuinfo_cur_freq. Under heavy
> load, the skew is observable as transient values that may exceed the
> platform maximum, as discussed in [1] and [2].
>
> This series adds a small generic hook for architectures that can obtain
> both FFH feedback counters in one operation, while preserving the
> existing per-register read path as the fallback.
>
> Patch 1 adds the generic CPPC hook and uses it from cppc_get_perf_ctrs().
> Patch 2 implements the hook on arm64 by sampling both AMU counters in a
> single operation on the target CPU.
>
> [1] https://lore.kernel.org/all/20231025093847.3740104-4-zengheng4@huawei.com/
> [2] https://lore.kernel.org/all/20231212072617.14756-1-lihuisong@huawei.com/
>
> Signed-off-by: Pengjie Zhang <zhangpengjie2@huawei.com>
>
> Pengjie Zhang (2):
>    ACPI: CPPC: add paired FFH feedback-counter read hook
>    arm64: topology: read CPPC FFH feedback counters in one operation
>
>   arch/arm64/kernel/topology.c | 75 ++++++++++++++++++++++++++++++++----
>   drivers/acpi/cppc_acpi.c     | 58 +++++++++++++++++++++++++---
>   include/acpi/cppc_acpi.h     |  7 ++++
>   3 files changed, 127 insertions(+), 13 deletions(-)
>
> --


Hi Pengjie,

Thanks for the patches.
The series looks good to me, and it fixes the cpuinfo_cur_freq
spikes on an NVIDIA Vera (FFH) platform.

Just one nit on patch 2 (counter read order), noted there.

Tested-by: Sumit Gupta <sumitg@nvidia.com>
Reviewed-by: Sumit Gupta <sumitg@nvidia.com>

Thanks,
Sumit





      parent reply	other threads:[~2026-06-29 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10  9:41 [PATCH 0/2] CPPC: reduce FFH feedback-counter sampling skew on arm64 Pengjie Zhang
2026-04-10  9:41 ` [PATCH 1/2] ACPI: CPPC: add paired FFH feedback-counter read hook Pengjie Zhang
2026-06-30  7:37   ` Beata Michalska
2026-07-01 12:01     ` Pengjie Zhang
2026-04-10  9:41 ` [PATCH 2/2] arm64: topology: read CPPC FFH feedback counters in one operation Pengjie Zhang
2026-06-29 15:27   ` Sumit Gupta
2026-07-01 10:56     ` Pengjie Zhang
2026-06-30  7:34   ` Beata Michalska
2026-07-01 12:21     ` Pengjie Zhang
2026-07-03  9:13       ` Beata Michalska
2026-04-30 10:00 ` [PATCH 0/2] CPPC: reduce FFH feedback-counter sampling skew on arm64 zhangpengjie (A)
2026-05-19 10:47   ` Will Deacon
2026-05-20  2:55     ` Pengjie Zhang
2026-06-24 10:51       ` Beata Michalska
2026-06-26 14:55       ` Vanshidhar Konda
2026-06-27 11:26         ` Pengjie Zhang
2026-06-27 10:50       ` Pengjie Zhang
2026-06-29 15:54 ` Sumit Gupta [this message]

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=16c7c5d4-d596-4a75-ac97-fb9d2c02c80c@nvidia.com \
    --to=sumitg@nvidia.com \
    --cc=acpica-devel@lists.linux.dev \
    --cc=beata.michalska@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=cuiyunhui@bytedance.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=lenb@kernel.org \
    --cc=lihuisong@huawei.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=rafael@kernel.org \
    --cc=robert.moore@intel.com \
    --cc=wanghuiqiang@huawei.com \
    --cc=wangzhi12@huawei.com \
    --cc=will@kernel.org \
    --cc=xuwei5@huawei.com \
    --cc=yubowen8@huawei.com \
    --cc=zhangpengjie2@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.