3 ms·
I don't think you can be totally transparent; [1] if the cores are really asymmetric, there will likely be timing differences. But, you could certainly do thing
by toast0 5y ago
I don't think you can be totally transparent; [1] if the cores are really asymmetric, there will likely be timing differences. But, you could certainly do things like if only the big cores support AVX, indicate AVX support to the program, and if it's running on the little core when it hits an AVX instruction, the kernel handles the invalid operation fault by rescheduling it to run on the large core.
If the program does a bunch of AVX once in a while, that can work well. If it's mostly AVX, and multithreaded, then you might likely spawn too many threads. If it's like one AVX instruction in each loop, that would also tend to be bad.
Balancing load would probably be a lot trickier than with SMP, but today's SMP is already tricky because frequency changes with the number of cores in use; it's not always optimum to run N threads on N cores anyway.
[1] and really, I think this meaning of transparent is really opaque; you don't want the program to know what core type it's running on.
- rbanffy 5y agoI think the best way would be two different approaches. One, perhaps based on nice values or other priorities, that would push scheduling to the smaller cores and one, one-way, where some form of program metadata indicates which kind of core would be optimally suited to run it without the program having any awareness of it.