3 ms·
'Work-stealing' schedulers already do this - jobs are scheduled onto the core which created them and presumably touched their data last, unless there is load im
by chrisseaton 9y ago
'Work-stealing' schedulers already do this - jobs are scheduled onto the core which created them and presumably touched their data last, unless there is load imbalance in which case other cores take jobs. I don't know about the internals of Erlang but I'd be surprised if it was not already work stealing as it's the usual technique.
- microcolonel 9y agoAs far as I'm aware, most work stealing schedulers still aren't cache-aware. One really naiive (but possibly effective) way to do this could be to have a per-core (or per L2, or per NUMA node) work LIFO which would be consulted before looking to other cores for work. When your core/L2/NUMA node schedules a task right before terminating, it is more likely that the next task will be local. This, of course, doesn't work if you're more concerned about jitter or latency under load. I noticed a paper about a cache-aware work-stealing scheduler which I have not yet read[0]. [0]: https://www.researchgate.net/publication/260358432_Adaptive_Cache_Aware_Bitier_Work-Stealing_in_Multisocket_Multicore_Architectures https://www.researchgate.net/publication/260358432_Adaptive_...