Skip to content

Commit 2bb7b09

Browse files
committed
linux/cpukinds: add Intel "LowPower" PMU set
Linux commit 9f4a39757c81d532f64232702537c53ad4092a5e added a new PMU set of core called "lowpower": "The upcoming ARL-H hybrid processor contains 2 different atom uarchs which have different PMU capabilities." It's not totally clear to me if previous generations with LP-Ecore (meteor and lunar lake) have different Ecore uarch, but they don't expose different PMU sets anyway (but we are able to distinguish them thanks to frequencies). Signed-off-by: Brice Goglin <[email protected]> (cherry picked from commit 4b2a139)
1 parent 533a065 commit 2bb7b09

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/hwloc.doxy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,7 @@ as reported by some <tt>cpufreq</tt> or ACPI drivers on Linux
24642464
</dd>
24652465
<dt>CoreType (x86)</dt>
24662466
<dd>A string describing the kind of core,
2467-
currently <tt>IntelAtom</tt> or <tt>IntelCore</tt>,
2467+
currently <tt>IntelAtom</tt>, <tt>IntelCore</tt> or <tt>IntelLowPower</tt>,
24682468
as reported by the x86 CPUID instruction and Linux PMU on some Intel processors.
24692469
</dd>
24702470
<dt>LinuxCapacity (Linux)</dt>

hwloc/topology-linux.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4712,7 +4712,7 @@ look_sysfscpukinds(struct hwloc_topology *topology,
47124712
int max_without_basefreq = 0; /* any cpu where we have maxfreq without basefreq? */
47134713
char str[293];
47144714
char *env;
4715-
hwloc_bitmap_t atom_pmu_set, core_pmu_set;
4715+
hwloc_bitmap_t atom_pmu_set, core_pmu_set, lowp_pmu_set;
47164716
int maxfreq_enabled = -1; /* -1 means adjust (default), 0 means ignore, 1 means enforce */
47174717
int use_cppc_nominal_freq = -1; /* -1 means try, 0 no, 1 yes */
47184718
unsigned adjust_max = 10;
@@ -4832,6 +4832,7 @@ look_sysfscpukinds(struct hwloc_topology *topology,
48324832
/* look at Intel core/atom PMUs */
48334833
atom_pmu_set = hwloc__alloc_read_path_as_cpulist("/sys/devices/cpu_atom/cpus", data->root_fd);
48344834
core_pmu_set = hwloc__alloc_read_path_as_cpulist("/sys/devices/cpu_core/cpus", data->root_fd);
4835+
lowp_pmu_set = hwloc__alloc_read_path_as_cpulist("/sys/devices/cpu_lowpower/cpus", data->root_fd);
48354836
if (atom_pmu_set) {
48364837
hwloc_linux_cpukinds_register_one(topology, atom_pmu_set,
48374838
HWLOC_CPUKIND_EFFICIENCY_UNKNOWN,
@@ -4848,6 +4849,14 @@ look_sysfscpukinds(struct hwloc_topology *topology,
48484849
} else {
48494850
hwloc_bitmap_free(core_pmu_set);
48504851
}
4852+
if (lowp_pmu_set) {
4853+
hwloc_linux_cpukinds_register_one(topology, lowp_pmu_set,
4854+
HWLOC_CPUKIND_EFFICIENCY_UNKNOWN,
4855+
(char *) "CoreType", (char *) "IntelLowPower");
4856+
/* the cpuset is given to the callee */
4857+
} else {
4858+
hwloc_bitmap_free(lowp_pmu_set);
4859+
}
48514860

48524861
return 0;
48534862
}

0 commit comments

Comments
 (0)