Re: [PATCH 0/9] Add CPU-type to topology
From: Brice Goglin
Date: Thu Jun 20 2024 - 11:23:46 EST
Le 20/06/2024 à 17:06, Dave Hansen a écrit :
On 6/19/24 14:25, Brice Goglin wrote:
Good point. From this patch series, I understand that the current kernel
side doesn't care about these different E-cores. However it might be
good to expose them as different cpu-types (or better name) to userspace ?
Something like type 0 = P-core, 1 = normal E-core, 2 = low power E-core ?
The first priority here is getting the kernel to comprehend these types
for architectural purposes: when there are functional differences
between the cores.
Let's get that in place, first. Then we can discuss the possibility of
new ABI in the area.
Agreed.
Did the ARM folks ever do a sysfs ABI for big.LITTLE? I don't see
anything obvious in Documentation/ABI/testing/sysfs-devices-system-cpu.
As far as I know, they only have the "capacity" field in sysfs cpu files
that reports a higher number for the equivalent of P-core:
From testing/sysfs-devices-system-cpu:
What: /sys/devices/system/cpu/cpuX/cpu_capacity
Date: December 2016
Contact: Linux kernel mailing list <linux-kernel@xxxxxxxxxxxxxxx>
Description: information about CPUs heterogeneity.
cpu_capacity: capacity of cpuX.
I don't know how it's calculated but I've never seen it report something wrong.
On Android/ARM phones, big cores usually have 1024 and small cores something
between 400 and 500.
Where there are 3 types of cores, they report 1024, 500-800 about ~250.
Brice