[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201126121329.GJ3040@hirez.programming.kicks-ass.net>
Date: Thu, 26 Nov 2020 13:13:29 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>,
"H. Peter Anvin" <hpa@...or.com>,
LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
Stephane Eranian <eranian@...gle.com>,
John Sperbeck <jsperbeck@...gle.com>,
"Lendacky, Thomas" <Thomas.Lendacky@....com>,
Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [PATCH 1/2] perf/x86/intel: Fix a warning on x86_pmu_stop() with
large PEBS
On Thu, Nov 26, 2020 at 08:09:21PM +0900, Namhyung Kim wrote:
> The commit 3966c3feca3f ("x86/perf/amd: Remove need to check "running"
> bit in NMI handler") introduced this. It seems x86_pmu_stop can be
> called recursively (like when it losts some samples) like below:
>
> x86_pmu_stop
> intel_pmu_disable_event (x86_pmu_disable)
> intel_pmu_pebs_disable
> intel_pmu_drain_pebs_nhm (x86_pmu_drain_pebs_buffer)
> x86_pmu_stop
>
> While commit 35d1ce6bec13 ("perf/x86/intel/ds: Fix x86_pmu_stop
> warning for large PEBS") fixed it for the normal cases, there's
> another path to call x86_pmu_stop() recursively when a PEBS error was
> detected (like two or more counters overflowed at the same time).
>
> Like in the Kan's previous fix, we can skip the interrupt accounting
> for large PEBS, so check the iregs which is set for PMI only.
>
> Fixes: 3966c3feca3f ("x86/perf/amd: Remove need to check "running" bit in NMI handler")
> Reported-by: John Sperbeck <jsperbeck@...gle.com>
> Suggested-by: Peter Zijlstra <peterz@...radead.org>
> Cc: "Lendacky, Thomas" <Thomas.Lendacky@....com>
> Cc: Kan Liang <kan.liang@...ux.intel.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Thanks for both!
Powered by blists - more mailing lists