Skip to content

Commit 4b2a139

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]>
1 parent 3a7153f commit 4b2a139

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

doc/hwloc.doxy

+1-1
Original file line numberDiff line numberDiff line change
@@ -2473,7 +2473,7 @@ as reported by some <tt>cpufreq</tt> or ACPI drivers on Linux
24732473
</dd>
24742474
<dt>CoreType (x86)</dt>
24752475
<dd>A string describing the kind of core,
2476-
currently <tt>IntelAtom</tt> or <tt>IntelCore</tt>,
2476+
currently <tt>IntelAtom</tt>, <tt>IntelCore</tt> or <tt>IntelLowPower</tt>,
24772477
as reported by the x86 CPUID instruction and Linux PMU on some Intel processors.
24782478
</dd>
24792479
<dt>LinuxCapacity (Linux)</dt>

hwloc/topology-linux.c

+10-1
Original file line numberDiff line numberDiff line change
@@ -4722,7 +4722,7 @@ look_sysfscpukinds(struct hwloc_topology *topology,
47224722
int max_without_basefreq = 0; /* any cpu where we have maxfreq without basefreq? */
47234723
char str[293];
47244724
char *env;
4725-
hwloc_bitmap_t atom_pmu_set, core_pmu_set;
4725+
hwloc_bitmap_t atom_pmu_set, core_pmu_set, lowp_pmu_set;
47264726
int maxfreq_enabled = -1; /* -1 means adjust (default), 0 means ignore, 1 means enforce */
47274727
int use_cppc_nominal_freq = -1; /* -1 means try, 0 no, 1 yes */
47284728
unsigned adjust_max = 10;
@@ -4842,6 +4842,7 @@ look_sysfscpukinds(struct hwloc_topology *topology,
48424842
/* look at Intel core/atom PMUs */
48434843
atom_pmu_set = hwloc__alloc_read_path_as_cpulist("/sys/devices/cpu_atom/cpus", data->root_fd);
48444844
core_pmu_set = hwloc__alloc_read_path_as_cpulist("/sys/devices/cpu_core/cpus", data->root_fd);
4845+
lowp_pmu_set = hwloc__alloc_read_path_as_cpulist("/sys/devices/cpu_lowpower/cpus", data->root_fd);
48454846
if (atom_pmu_set) {
48464847
hwloc_linux_cpukinds_register_one(topology, atom_pmu_set,
48474848
HWLOC_CPUKIND_EFFICIENCY_UNKNOWN,
@@ -4858,6 +4859,14 @@ look_sysfscpukinds(struct hwloc_topology *topology,
48584859
} else {
48594860
hwloc_bitmap_free(core_pmu_set);
48604861
}
4862+
if (lowp_pmu_set) {
4863+
hwloc_linux_cpukinds_register_one(topology, lowp_pmu_set,
4864+
HWLOC_CPUKIND_EFFICIENCY_UNKNOWN,
4865+
(char *) "CoreType", (char *) "IntelLowPower");
4866+
/* the cpuset is given to the callee */
4867+
} else {
4868+
hwloc_bitmap_free(lowp_pmu_set);
4869+
}
48614870

48624871
return 0;
48634872
}

0 commit comments

Comments
 (0)