The current state of Alder Lake E-cores and P-cores on Linux

I’ve googled around a bit and couldn’t find any direct answers to whether Linux fully supports scheduling apps to efficiency or performance cores. I’m on kernel 6.2 (ubuntu 23.04) running on a Core i5 12500h, the only related kernel config flag enabled is CONFIG_INTEL_HFI_THERMAL=y but no INTEL_THREAD_DIRECTOR or X86_FEATURE_ITD or other similar.

So, how could I tell if Linux is scheduling the programs properly? Is it implemented on kernel 6.2 or should I try kernel 5.xx?

Can I check this from userspace or is it something implemented deep down that is actually transparent to userspace?

many thanks for any direction that anyone can provide.

I am probably wrong, but what i remember when 12th gen was announced it was said thread director is hw based and software was not needed? I don’t know, maybe mis remembering. But that is why it works just as well in windows 10 as it does in windows 11.

AFAIK, the Linux kernel only reads the performance and energy efficiency values from the HFI table (which the processor can notify the OS of values updates via thermal interrupt, i.e. CONFIG_INTEL_HFI_THERMAL) but currently does not make use of them.

Since these values are not exposed via sysfs, the only way to access them from user space is via /dev/mem after disabling CONFIG_DEVMEM_STRICT and reading the appropriate memory address from the MSR (17D0H).

There is a pending patch to read a thread class from HFI and make Linux’s fair scheduler use them (aka the hardware Thread Director), but it has not been merged yet.

(source: Reddit - Dive into anything)

is that still true?

CFS does have a capability to figure out heterogeneous CPUs and has an ability to schedule via Capacity Aware Scheduling and Energy Aware Scheduling (to support big.LITTLE).

AFAIK, x86 only implements the “Frequency invariance” part in the described Capacity Aware Scheduling documentation (originally implemented for schedutil scaling driver). My guess is that the observed behavior might be CFS scheduling tasks according to its frequency and duty cycle or possibly prioritizing tasks to be run in the same cluster (12600K only has 4 E-cores, so it can’t fit 12 threads).

Wouldn’t know- just got some measely i3s – 0 E/P shuffling there