From: Peter Zijlstra <peterz@infradead.org>
To: Wen Yang <wenyang@linux.alibaba.com>
Cc: Stephane Eranian <eranian@google.com>,
Wen Yang <simon.wy@alibaba-inc.com>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
mark rutland <mark.rutland@arm.com>, jiri olsa <jolsa@redhat.com>,
namhyung kim <namhyung@kernel.org>,
borislav petkov <bp@alien8.de>,
x86@kernel.org, "h. peter anvin" <hpa@zytor.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH 2/2] perf/x86: improve the event scheduling to avoid unnecessary pmu_stop/start
Date: Tue, 19 Apr 2022 22:57:38 +0200 [thread overview]
Message-ID: <20220419205738.GZ2731@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <c33fd91c-8f8f-c82f-4e03-8799f3b8cd28@linux.alibaba.com>
On Tue, Apr 19, 2022 at 10:16:12PM +0800, Wen Yang wrote:
> We finally found that TFA (TSX Force Abort) may affect PMC3's behavior,
> refer to the following patch:
>
> 400816f60c54 perf/x86/intel: ("Implement support for TSX Force Abort")
>
> When the MSR gets set; the microcode will no longer use PMC3 but will
> Force Abort every TSX transaction (upon executing COMMIT).
>
> When TSX Force Abort (TFA) is allowed (default); the MSR gets set when
> PMC3 gets scheduled and cleared when, after scheduling, PMC3 is
> unused.
>
> When TFA is not allowed; clear PMC3 from all constraints such that it
> will not get used.
>
>
> >
> > However, this patch attempts to avoid the switching of the pmu counters
> > in various perf_events, so the special behavior of a single pmu counter
> > will not be propagated to other events.
> >
>
> Since PMC3 may have special behaviors, the continuous switching of PMU
> counters may not only affects the performance, but also may lead to abnormal
> data, please consider this patch again.
I'm not following. How do you get abnormal data?
Are you using RDPMC from userspace? If so, are you following the
prescribed logic using the self-monitoring interface?
next prev parent reply other threads:[~2022-04-19 20:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 11:03 [RESEND PATCH 1/2] perf/x86: extract code to assign perf events for both core and uncore Wen Yang
2022-03-04 11:03 ` [RESEND PATCH 2/2] perf/x86: improve the event scheduling to avoid unnecessary pmu_stop/start Wen Yang
2022-03-04 15:39 ` Peter Zijlstra
2022-03-06 14:36 ` Wen Yang
2022-03-07 17:14 ` Stephane Eranian
2022-03-08 6:42 ` Wen Yang
2022-03-08 12:53 ` Peter Zijlstra
2022-03-08 12:50 ` Peter Zijlstra
2022-03-10 3:50 ` Wen Yang
2022-03-14 10:55 ` Peter Zijlstra
2022-03-17 17:54 ` Wen Yang
2022-04-17 15:06 ` Wen Yang
2022-04-19 14:16 ` Wen Yang
2022-04-19 20:57 ` Peter Zijlstra [this message]
2022-04-19 21:18 ` Stephane Eranian
2022-04-20 14:44 ` Wen 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=20220419205738.GZ2731@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=simon.wy@alibaba-inc.com \
--cc=tglx@linutronix.de \
--cc=wenyang@linux.alibaba.com \
--cc=x86@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