From: Sandipan Das <sandipan.das@amd.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
x86@kernel.org, bp@alien8.de, acme@kernel.org,
namhyung@kernel.org, jolsa@kernel.org, tglx@linutronix.de,
mingo@redhat.com, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, dave.hansen@linux.intel.com,
like.xu.linux@gmail.com, Stephane Eranian <eranian@google.com>,
ananth.narayan@amd.com, ravi.bangoria@amd.com,
santosh.shukla@amd.com
Subject: Re: [PATCH 04/13] x86/cpufeatures: Add LbrExtV2 feature bit
Date: Tue, 23 Aug 2022 14:21:06 +0530 [thread overview]
Message-ID: <91cc5c2b-75d9-1b2a-9ad0-a94a60ee72c2@amd.com> (raw)
In-Reply-To: <YwOEIESeDSuekmf8@worktop.programming.kicks-ass.net>
Hi Peter,
On 8/22/2022 6:56 PM, Peter Zijlstra wrote:
> On Mon, Aug 22, 2022 at 06:22:25PM +0530, Sandipan Das wrote:
>> AMD LbrExtV2 is similar to Intel LBR. Unlike BRS, LbrExtV2 does not rely on
>
> LbrExtV2 must be the most terrible name ever, please stop using it. Heck
> your own code calls it lbr_v2 wherever it can.
>
> So can we please just kill that name entirely?
>
> $ quilt diff --combine - | grep -i lbrext_v2
> + if (x86_pmu.version < 2 || !boot_cpu_has(X86_FEATURE_LBREXT_V2))
> +#define X86_FEATURE_LBREXT_V2 ( 3*32+17) /* AMD Last Branch Record Extension Version 2 */
> + { X86_FEATURE_LBREXT_V2, CPUID_EAX, 1, 0x80000022, 0 },
>
> Is the complete usage of this silly name.
>
I don't have any reservations about the name :) Its the name of the feature
bit from CPUID 0x80000022 EAX as mentioned in the processor manuals.
Unlike BRS, LBRv2 (if I may call it so) is an architected feature starting
with Zen4. BRS is model-specific and available only on Zen3. LBRv2 supersedes
it and from an architectural perspective, future platforms are slated to have
LBRv2 and not BRS. As Stephane alluded to earlier on this thread, AMD's legacy
LBR is 1-entry deep. We want to be able to differentiate from that as well as
BRS. For these reasons, and also to keep it disjoint from Intel's LBR, if you
so prefer, I can rename this feature to AMD_LBR_V2.
>> interrupt holding. The branch records are "frozen" at the time of counter
>> overflow.
>
> Yes, I get all that. It is also significantly different from Intel LBR
> in all details and shares not a single line of code, so also calling it
> LBR is confusing at best.
>
> The MSRs are called AMD_SAMPL_BR, so why not call the thing BRS_V2 ?
Sorry for the confusion with the register names. Since the SAMP_BR_FROM
and SAMP_BR_TO registers used by BRS have the same addresses as that of
the LBR_TO_V2 and LBR_FROM_V2 registers, I chose to reuse the definitions.
It it helps and considering LBRv2 is an architected feature, I can rename
AMD_SAMP_BR_* to AMD_LBR_V2_* or have these MSR definitions duplicated with
different names.
- Sandipan
next prev parent reply other threads:[~2022-08-23 10:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 12:29 [PATCH 00/13] perf/x86/amd: Add AMD LbrExtV2 support Sandipan Das
2022-08-11 12:29 ` [PATCH 01/13] perf/x86/amd/brs: Move feature-specific functions Sandipan Das
2022-08-11 12:29 ` [PATCH 02/13] perf/x86/amd/core: Refactor branch attributes Sandipan Das
2022-08-11 12:29 ` [PATCH 03/13] perf/x86/amd/core: Add generic branch record interfaces Sandipan Das
2022-08-11 12:29 ` [PATCH 04/13] x86/cpufeatures: Add LbrExtV2 feature bit Sandipan Das
2022-08-11 13:13 ` Borislav Petkov
2022-08-15 11:27 ` Peter Zijlstra
2022-08-15 19:42 ` Stephane Eranian
2022-08-22 9:05 ` Peter Zijlstra
2022-08-22 12:52 ` Sandipan Das
2022-08-22 13:26 ` Peter Zijlstra
2022-08-23 8:51 ` Sandipan Das [this message]
2022-08-25 10:24 ` Peter Zijlstra
2022-08-25 12:26 ` Sandipan Das
2022-08-11 12:29 ` [PATCH 05/13] perf/x86/amd/lbr: Detect LbrExtV2 support Sandipan Das
2022-08-11 12:29 ` [PATCH 06/13] perf/x86/amd/lbr: Add LbrExtV2 branch record support Sandipan Das
2022-08-11 12:29 ` [PATCH 07/13] perf/x86/amd/lbr: Add LbrExtV2 hardware branch filter support Sandipan Das
2022-08-11 12:29 ` [PATCH 08/13] perf/x86: Move branch classifier Sandipan Das
2022-08-11 12:29 ` [PATCH 09/13] perf/x86/amd/lbr: Add LbrExtV2 software branch filter support Sandipan Das
2022-08-11 12:29 ` [PATCH 10/13] perf/x86: Make branch classifier fusion-aware Sandipan Das
2022-08-11 12:29 ` [PATCH 11/13] perf/x86/amd/lbr: Use fusion-aware branch classifier Sandipan Das
2022-08-11 12:30 ` [PATCH 12/13] perf/core: Add speculation info to branch entries Sandipan Das
2022-08-11 12:30 ` [PATCH 13/13] perf/x86/amd/lbr: Add LbrExtV2 branch speculation info support Sandipan Das
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=91cc5c2b-75d9-1b2a-9ad0-a94a60ee72c2@amd.com \
--to=sandipan.das@amd.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=ananth.narayan@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=like.xu.linux@gmail.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=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=santosh.shukla@amd.com \
--cc=tglx@linutronix.de \
--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
all inboxes | Powered by JetHome®