taskset
is a standard feature to assign cores to applications which works perfectly in your situation. E.g. in the case of Intel Core i9 12900K pin your task to the first sixteen cores and you're good to go:
taskset 0xFFFF application
taskset -c 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 application
The second form is longer but easier to read.
AFAIK the standard Linux kernel doesn't currently have any infrastructure to hint the kernel that certain applications need to use certain types of cores. Yes, the Linux kernel supports BIG.little ARM architectures but I've not heard of API to utilize this feature.
As of January, 2022 the Linux kernel does not support Intel Thread Director in any shape or form. There have been no patches, nothing.
Lastly, it's worth noting that Linux and Windows differ in how they report HT/SMT siblings.
Windows lists them in pairs, i.e. Core 1: Thread 1 Thread 2, Core 2: Thread 1 Thread 2, etc. Linux first lists all physical cores, then their HT/SMT siblings.
So, if you want to test physical cores without using HT/SMT for a sixteen-core CPU, you'll do this:
taskset -c 0,1,2,3,4,5,6,7 application
taskset 0xFF application
More on it here: How do I know which processors are physical cores?
Option N2: you can put E cores offline, and they will become invisible for your system:
echo 0 | sudo tee /sys/devices/system/cpu/cpu{NN}/online
For Intel Core i9 12900K that'll be
for i in {16..23}; do echo 0 | sudo tee /sys/devices/system/cpu/cpu${i}/online; done
taskset -c CORE_ID 7z b -mmt1
. Now I know that the last 8 cores are efficiency cores, they have 20-25% less MIPS. But I think that it is not very elegant solution and there may be some people who know more. – Radiant Jan 15 '22 at 11:52