From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>,
Eranian Stephane <eranian@google.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Dapeng Mi <dapeng1.mi@intel.com>, Zide Chen <zide.chen@intel.com>,
Falcon Thomas <thomas.falcon@intel.com>,
Xudong Hao <xudong.hao@intel.com>
Subject: Re: [Patch v3 4/4] perf/x86/intel: Consolidate MSR_IA32_PERF_CFG_C tracking
Date: Wed, 29 Apr 2026 08:50:58 +0800 [thread overview]
Message-ID: <e32c7f64-9b12-4db2-a67e-92fd33cf9683@linux.intel.com> (raw)
In-Reply-To: <20260428130040.GZ3102624@noisy.programming.kicks-ass.net>
On 4/28/2026 9:00 PM, Peter Zijlstra wrote:
> On Mon, Apr 27, 2026 at 04:55:13PM +0800, Dapeng Mi wrote:
>> Both Auto Counter Reload (ACR) and Architectural PEBS use the PERF_CFG_C
>> MSRs to configure event behavior. Currently, the driver maintains two
>> independent variables acr_cfg_c and cfg_c_val to cache the values intended
>> for these MSRs.
>>
>> Using separate variables to track a single hardware register state is
>> error-prone and can lead to configuration conflicts. Consolidate the
>> tracking into a single cfg_c_val variable to ensure a unified and
>> consistent view of the PERF_CFG_C MSR state.
>>
>> Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
> So the earlier patches deserve to be in perf/urgent, but this one
> doesn't actually fix anything and goes in perf/core ?
Yes, I suppose so.
But Sashiko found a new corner issue.
"
If Event A moves to a new counter but Event B itself does not move,
match_prev_assignment() would evaluate to true for Event B, and
x86_pmu_start() would be skipped.
Does this mean the updated hw.config1 for Event B is never written to the
physical hardware MSR, breaking the Auto Counter Reload functionality?
"
and the Patch 1/4 can be further optimized and simplified.
I would post an new version patchset to fix all these.
Thanks.
>
prev parent reply other threads:[~2026-04-29 0:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 8:55 [Patch v3 0/4] perf/x86/intel: Fix bugs of auto counter reload sampling Dapeng Mi
2026-04-27 8:55 ` [Patch v3 1/4] perf/x86/intel: Improve validation and configuration of ACR masks Dapeng Mi
2026-04-27 10:13 ` sashiko-bot
2026-04-28 9:51 ` Mi, Dapeng
2026-04-27 8:55 ` [Patch v3 2/4] perf/x86/intel: Disable PMI for self-reloaded ACR events Dapeng Mi
2026-04-27 8:55 ` [Patch v3 3/4] perf/x86/intel: Enable auto counter reload for DMR Dapeng Mi
2026-04-27 8:55 ` [Patch v3 4/4] perf/x86/intel: Consolidate MSR_IA32_PERF_CFG_C tracking Dapeng Mi
2026-04-27 12:12 ` sashiko-bot
2026-04-28 9:59 ` Mi, Dapeng
2026-04-28 13:00 ` Peter Zijlstra
2026-04-29 0:50 ` Mi, Dapeng [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=e32c7f64-9b12-4db2-a67e-92fd33cf9683@linux.intel.com \
--to=dapeng1.mi@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dapeng1.mi@intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=thomas.falcon@intel.com \
--cc=xudong.hao@intel.com \
--cc=zide.chen@intel.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