5 ms·
Could always just sort processes to cores by nice value.
by yjftsjthsd-h 5y ago
Could always just sort processes to cores by nice value.
- rbanffy 5y agoCan the kernel do it transparently on asymmetric core machines? Intel did show one some time ago and you can kind of manufacture cores with bigger caches and more execution ports by turning off SMT for them, turning an 8-core x86 into 8 "cores" with smaller cache and another 4 with twices as much L1.
- toast0 5y agoI 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.