From: Peter Zijlstra <peterz@infradead.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
ak@linux.intel.com, stable@vger.kernel.org
Subject: Re: [PATCH V2] perf/x86/intel: Apply mid ACK for small core
Date: Tue, 3 Aug 2021 18:17:38 +0200 [thread overview]
Message-ID: <YQlsIvh7vwLt3f6g@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <9b0cb4ec-e8b8-3739-7b8d-e1c05785023a@linux.intel.com>
On Tue, Aug 03, 2021 at 11:20:20AM -0400, Liang, Kan wrote:
>
>
> On 8/3/2021 10:55 AM, Peter Zijlstra wrote:
> > On Tue, Aug 03, 2021 at 06:25:28AM -0700, kan.liang@linux.intel.com wrote:
> > > From: Kan Liang <kan.liang@linux.intel.com>
> > >
> > > A warning as below may be occasionally triggered in an ADL machine when
> > > these conditions occur,
> > > - Two perf record commands run one by one. Both record a PEBS event.
> > > - Both runs on small cores.
> > > - They have different adaptive PEBS configuration (PEBS_DATA_CFG).
> > >
> > > [ 673.663291] WARNING: CPU: 4 PID: 9874 at
> > > arch/x86/events/intel/ds.c:1743
> > > setup_pebs_adaptive_sample_data+0x55e/0x5b0
> > > [ 673.663348] RIP: 0010:setup_pebs_adaptive_sample_data+0x55e/0x5b0
> > > [ 673.663357] Call Trace:
> > > [ 673.663357] <NMI>
> > > [ 673.663357] intel_pmu_drain_pebs_icl+0x48b/0x810
> > > [ 673.663360] perf_event_nmi_handler+0x41/0x80
> > > [ 673.663368] </NMI>
> > > [ 673.663370] __perf_event_task_sched_in+0x2c2/0x3a0
> > >
> > > Different from the big core, the small core requires the ACK right
> > > before re-enabling counters in the NMI handler, otherwise a stale PEBS
> > > record may be dumped into the later NMI handler, which trigger the
> > > warning.
> > >
> > > Add a new mid_ack flag to track the case. Add all PMI handler bits in
> > > the struct x86_hybrid_pmu to track the bits for different types of PMUs.
> > > Apply mid ACK for the small cores on an Alder Lake machine.
> >
> > Why do we need a new option? Why isn't early (as in not late) good
> > enough?
> >
>
> The early ACK can fix this issue, however it triggers a spurious NMI during
> the stress test. I'm told to do the ACK right before re-enabling counters
> for small cores. That indeed fixes all the issues.
Any chance that would also work for the chips that now use late_ack?
I'm just (desperately) trying to minimize the amount of quirks here ;-)
next prev parent reply other threads:[~2021-08-03 16:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 13:25 [PATCH V2] perf/x86/intel: Apply mid ACK for small core kan.liang
2021-08-03 14:55 ` Peter Zijlstra
2021-08-03 15:20 ` Liang, Kan
2021-08-03 16:17 ` Peter Zijlstra [this message]
2021-08-03 17:00 ` Liang, Kan
2021-08-03 18:00 ` Andi Kleen
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=YQlsIvh7vwLt3f6g@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@vger.kernel.org \
/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