* [PATCH 1/3] perf/x86/intel: Add Granite Rapids
@ 2023-03-14 17:00 kan.liang
2023-03-14 17:00 ` [PATCH 2/3] perf/x86/msr: " kan.liang
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: kan.liang @ 2023-03-14 17:00 UTC (permalink / raw)
To: peterz, mingo, linux-kernel; +Cc: ak, eranian, Kan Liang
From: Kan Liang <kan.liang@linux.intel.com>
From core PMU's perspective, Granite Rapids is similar to the Sapphire
Rapids. The key differences include:
- Doesn't need the AUX event workaround for the mem load event.
(Implement in this patch).
- Support Retire Latency (Has been implemented in the commit
c87a31093c70 ("perf/x86: Support Retire Latency"))
- The event list, which will be supported in the perf tool later.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
arch/x86/events/intel/core.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index a3fb996a86a1..070cc4ef2672 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -5469,6 +5469,15 @@ pebs_is_visible(struct kobject *kobj, struct attribute *attr, int i)
return x86_pmu.pebs ? attr->mode : 0;
}
+static umode_t
+mem_is_visible(struct kobject *kobj, struct attribute *attr, int i)
+{
+ if (attr == &event_attr_mem_ld_aux.attr.attr)
+ return x86_pmu.flags & PMU_FL_MEM_LOADS_AUX ? attr->mode : 0;
+
+ return pebs_is_visible(kobj, attr, i);
+}
+
static umode_t
lbr_is_visible(struct kobject *kobj, struct attribute *attr, int i)
{
@@ -5496,7 +5505,7 @@ static struct attribute_group group_events_td = {
static struct attribute_group group_events_mem = {
.name = "events",
- .is_visible = pebs_is_visible,
+ .is_visible = mem_is_visible,
};
static struct attribute_group group_events_tsx = {
@@ -6486,6 +6495,10 @@ __init int intel_pmu_init(void)
case INTEL_FAM6_SAPPHIRERAPIDS_X:
case INTEL_FAM6_EMERALDRAPIDS_X:
+ x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX;
+ fallthrough;
+ case INTEL_FAM6_GRANITERAPIDS_X:
+ case INTEL_FAM6_GRANITERAPIDS_D:
pmem = true;
x86_pmu.late_ack = true;
memcpy(hw_cache_event_ids, spr_hw_cache_event_ids, sizeof(hw_cache_event_ids));
@@ -6502,7 +6515,6 @@ __init int intel_pmu_init(void)
x86_pmu.flags |= PMU_FL_HAS_RSP_1;
x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
x86_pmu.flags |= PMU_FL_INSTR_LATENCY;
- x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX;
x86_pmu.hw_config = hsw_hw_config;
x86_pmu.get_event_constraints = spr_get_event_constraints;
--
2.35.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] perf/x86/msr: Add Granite Rapids
2023-03-14 17:00 [PATCH 1/3] perf/x86/intel: Add Granite Rapids kan.liang
@ 2023-03-14 17:00 ` kan.liang
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Kan Liang
2023-03-14 17:00 ` [PATCH 3/3] perf/x86/cstate: Add Granite Rapids support kan.liang
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: kan.liang @ 2023-03-14 17:00 UTC (permalink / raw)
To: peterz, mingo, linux-kernel; +Cc: ak, eranian, Kan Liang
From: Kan Liang <kan.liang@linux.intel.com>
The same as Sapphire Rapids, the SMI_COUNT MSR is also supported on
Granite Rapids. Add Granite Rapids model.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
arch/x86/events/msr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/events/msr.c b/arch/x86/events/msr.c
index c65d8906cbcf..0feaaa571303 100644
--- a/arch/x86/events/msr.c
+++ b/arch/x86/events/msr.c
@@ -70,6 +70,8 @@ static bool test_intel(int idx, void *data)
case INTEL_FAM6_BROADWELL_X:
case INTEL_FAM6_SAPPHIRERAPIDS_X:
case INTEL_FAM6_EMERALDRAPIDS_X:
+ case INTEL_FAM6_GRANITERAPIDS_X:
+ case INTEL_FAM6_GRANITERAPIDS_D:
case INTEL_FAM6_ATOM_SILVERMONT:
case INTEL_FAM6_ATOM_SILVERMONT_D:
--
2.35.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] perf/x86/cstate: Add Granite Rapids support
2023-03-14 17:00 [PATCH 1/3] perf/x86/intel: Add Granite Rapids kan.liang
2023-03-14 17:00 ` [PATCH 2/3] perf/x86/msr: " kan.liang
@ 2023-03-14 17:00 ` kan.liang
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Artem Bityutskiy
2023-03-20 10:32 ` [PATCH 1/3] perf/x86/intel: Add Granite Rapids Peter Zijlstra
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Kan Liang
3 siblings, 1 reply; 7+ messages in thread
From: kan.liang @ 2023-03-14 17:00 UTC (permalink / raw)
To: peterz, mingo, linux-kernel; +Cc: ak, eranian, Artem Bityutskiy
From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Granite Rapids Xeon is successor or Emerald Rapids Xeon, and it will use
the same C-state residency counters as Emerald Rapids (and previous
Xeons, all the way back to Ice Lake Xeon).
Add Granite Rapids Xeon support.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
---
arch/x86/events/intel/cstate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c
index 551741e79e03..835862c548cc 100644
--- a/arch/x86/events/intel/cstate.c
+++ b/arch/x86/events/intel/cstate.c
@@ -678,6 +678,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &icx_cstates),
X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &icx_cstates),
+ X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_X, &icx_cstates),
+ X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_D, &icx_cstates),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
--
2.35.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] perf/x86/intel: Add Granite Rapids
2023-03-14 17:00 [PATCH 1/3] perf/x86/intel: Add Granite Rapids kan.liang
2023-03-14 17:00 ` [PATCH 2/3] perf/x86/msr: " kan.liang
2023-03-14 17:00 ` [PATCH 3/3] perf/x86/cstate: Add Granite Rapids support kan.liang
@ 2023-03-20 10:32 ` Peter Zijlstra
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Kan Liang
3 siblings, 0 replies; 7+ messages in thread
From: Peter Zijlstra @ 2023-03-20 10:32 UTC (permalink / raw)
To: kan.liang; +Cc: mingo, linux-kernel, ak, eranian
On Tue, Mar 14, 2023 at 10:00:39AM -0700, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
>
> From core PMU's perspective, Granite Rapids is similar to the Sapphire
> Rapids. The key differences include:
> - Doesn't need the AUX event workaround for the mem load event.
> (Implement in this patch).
> - Support Retire Latency (Has been implemented in the commit
> c87a31093c70 ("perf/x86: Support Retire Latency"))
> - The event list, which will be supported in the perf tool later.
>
> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip: perf/core] perf/x86/cstate: Add Granite Rapids support
2023-03-14 17:00 ` [PATCH 3/3] perf/x86/cstate: Add Granite Rapids support kan.liang
@ 2023-03-22 9:14 ` tip-bot2 for Artem Bityutskiy
0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Artem Bityutskiy @ 2023-03-22 9:14 UTC (permalink / raw)
To: linux-tip-commits
Cc: Artem Bityutskiy, Peter Zijlstra (Intel), x86, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 872d28001be56b205bd9b3f97cea1571a1bde317
Gitweb: https://git.kernel.org/tip/872d28001be56b205bd9b3f97cea1571a1bde317
Author: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
AuthorDate: Tue, 14 Mar 2023 10:00:41 -07:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 21 Mar 2023 14:43:08 +01:00
perf/x86/cstate: Add Granite Rapids support
Granite Rapids Xeon is successor or Emerald Rapids Xeon, and it will use
the same C-state residency counters as Emerald Rapids (and previous
Xeons, all the way back to Ice Lake Xeon).
Add Granite Rapids Xeon support.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230314170041.2967712-3-kan.liang@linux.intel.com
---
arch/x86/events/intel/cstate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/events/intel/cstate.c b/arch/x86/events/intel/cstate.c
index 551741e..835862c 100644
--- a/arch/x86/events/intel/cstate.c
+++ b/arch/x86/events/intel/cstate.c
@@ -678,6 +678,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
X86_MATCH_INTEL_FAM6_MODEL(ICELAKE_D, &icx_cstates),
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &icx_cstates),
X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &icx_cstates),
+ X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_X, &icx_cstates),
+ X86_MATCH_INTEL_FAM6_MODEL(GRANITERAPIDS_D, &icx_cstates),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE_L, &icl_cstates),
X86_MATCH_INTEL_FAM6_MODEL(TIGERLAKE, &icl_cstates),
^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip: perf/core] perf/x86/msr: Add Granite Rapids
2023-03-14 17:00 ` [PATCH 2/3] perf/x86/msr: " kan.liang
@ 2023-03-22 9:14 ` tip-bot2 for Kan Liang
0 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Kan Liang @ 2023-03-22 9:14 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Kan Liang, Peter Zijlstra (Intel), x86, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 5a796d5cb5d11f5aad4893a59f22715810769928
Gitweb: https://git.kernel.org/tip/5a796d5cb5d11f5aad4893a59f22715810769928
Author: Kan Liang <kan.liang@linux.intel.com>
AuthorDate: Tue, 14 Mar 2023 10:00:40 -07:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 21 Mar 2023 14:43:08 +01:00
perf/x86/msr: Add Granite Rapids
The same as Sapphire Rapids, the SMI_COUNT MSR is also supported on
Granite Rapids. Add Granite Rapids model.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230314170041.2967712-2-kan.liang@linux.intel.com
---
arch/x86/events/msr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/events/msr.c b/arch/x86/events/msr.c
index c65d890..0feaaa5 100644
--- a/arch/x86/events/msr.c
+++ b/arch/x86/events/msr.c
@@ -70,6 +70,8 @@ static bool test_intel(int idx, void *data)
case INTEL_FAM6_BROADWELL_X:
case INTEL_FAM6_SAPPHIRERAPIDS_X:
case INTEL_FAM6_EMERALDRAPIDS_X:
+ case INTEL_FAM6_GRANITERAPIDS_X:
+ case INTEL_FAM6_GRANITERAPIDS_D:
case INTEL_FAM6_ATOM_SILVERMONT:
case INTEL_FAM6_ATOM_SILVERMONT_D:
^ permalink raw reply [flat|nested] 7+ messages in thread
* [tip: perf/core] perf/x86/intel: Add Granite Rapids
2023-03-14 17:00 [PATCH 1/3] perf/x86/intel: Add Granite Rapids kan.liang
` (2 preceding siblings ...)
2023-03-20 10:32 ` [PATCH 1/3] perf/x86/intel: Add Granite Rapids Peter Zijlstra
@ 2023-03-22 9:14 ` tip-bot2 for Kan Liang
3 siblings, 0 replies; 7+ messages in thread
From: tip-bot2 for Kan Liang @ 2023-03-22 9:14 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Kan Liang, Peter Zijlstra (Intel), x86, linux-kernel
The following commit has been merged into the perf/core branch of tip:
Commit-ID: bc4000fdb009a531fc5b94339f8531eee64bc232
Gitweb: https://git.kernel.org/tip/bc4000fdb009a531fc5b94339f8531eee64bc232
Author: Kan Liang <kan.liang@linux.intel.com>
AuthorDate: Tue, 14 Mar 2023 10:00:39 -07:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Tue, 21 Mar 2023 14:43:08 +01:00
perf/x86/intel: Add Granite Rapids
>From core PMU's perspective, Granite Rapids is similar to the Sapphire
Rapids. The key differences include:
- Doesn't need the AUX event workaround for the mem load event.
(Implement in this patch).
- Support Retire Latency (Has been implemented in the commit
c87a31093c70 ("perf/x86: Support Retire Latency"))
- The event list, which will be supported in the perf tool later.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20230314170041.2967712-1-kan.liang@linux.intel.com
---
arch/x86/events/intel/core.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index a3fb996..070cc4e 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -5470,6 +5470,15 @@ pebs_is_visible(struct kobject *kobj, struct attribute *attr, int i)
}
static umode_t
+mem_is_visible(struct kobject *kobj, struct attribute *attr, int i)
+{
+ if (attr == &event_attr_mem_ld_aux.attr.attr)
+ return x86_pmu.flags & PMU_FL_MEM_LOADS_AUX ? attr->mode : 0;
+
+ return pebs_is_visible(kobj, attr, i);
+}
+
+static umode_t
lbr_is_visible(struct kobject *kobj, struct attribute *attr, int i)
{
return x86_pmu.lbr_nr ? attr->mode : 0;
@@ -5496,7 +5505,7 @@ static struct attribute_group group_events_td = {
static struct attribute_group group_events_mem = {
.name = "events",
- .is_visible = pebs_is_visible,
+ .is_visible = mem_is_visible,
};
static struct attribute_group group_events_tsx = {
@@ -6486,6 +6495,10 @@ __init int intel_pmu_init(void)
case INTEL_FAM6_SAPPHIRERAPIDS_X:
case INTEL_FAM6_EMERALDRAPIDS_X:
+ x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX;
+ fallthrough;
+ case INTEL_FAM6_GRANITERAPIDS_X:
+ case INTEL_FAM6_GRANITERAPIDS_D:
pmem = true;
x86_pmu.late_ack = true;
memcpy(hw_cache_event_ids, spr_hw_cache_event_ids, sizeof(hw_cache_event_ids));
@@ -6502,7 +6515,6 @@ __init int intel_pmu_init(void)
x86_pmu.flags |= PMU_FL_HAS_RSP_1;
x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
x86_pmu.flags |= PMU_FL_INSTR_LATENCY;
- x86_pmu.flags |= PMU_FL_MEM_LOADS_AUX;
x86_pmu.hw_config = hsw_hw_config;
x86_pmu.get_event_constraints = spr_get_event_constraints;
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-22 9:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14 17:00 [PATCH 1/3] perf/x86/intel: Add Granite Rapids kan.liang
2023-03-14 17:00 ` [PATCH 2/3] perf/x86/msr: " kan.liang
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Kan Liang
2023-03-14 17:00 ` [PATCH 3/3] perf/x86/cstate: Add Granite Rapids support kan.liang
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Artem Bityutskiy
2023-03-20 10:32 ` [PATCH 1/3] perf/x86/intel: Add Granite Rapids Peter Zijlstra
2023-03-22 9:14 ` [tip: perf/core] " tip-bot2 for Kan Liang
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®