Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work stealing hints for heterogeneous memory architectures #581

Open
boxerab opened this issue Apr 24, 2024 · 2 comments
Open

Work stealing hints for heterogeneous memory architectures #581

boxerab opened this issue Apr 24, 2024 · 2 comments
Labels
question Further information is requested

Comments

@boxerab
Copy link
Contributor

boxerab commented Apr 24, 2024

Hello! I have an idea to reduce memory latency on NUMA or CCX-based systems.

I've read older issues here on this topic, where it is argued that work stealing is more important to performance than partitioning tasks by NUMA nodes. This makes sense. I'm not familiar with the details of the TaskFlow work stealing algorithm, but would it be possible to give hints as to which threads the work should be stolen from? Given the choice of local queues to steal from, the hint would let the system favour queues from the same NUMA node. Or favour queue from hyperthreading sibling thread.

Combined with thread affinity settings, this could be beneficial for certain memory-bound applications.

@tsung-wei-huang
Copy link
Member

I think it's possible to give a thread a hint about which worker queue to steal. The entire work-stealing function is implemented here. Currently, as you can see, it's completely random. Perhaps can think about how to use w._vtm as the hint?

@tsung-wei-huang tsung-wei-huang added the question Further information is requested label May 6, 2024
@boxerab
Copy link
Contributor Author

boxerab commented May 6, 2024

Perhaps can think about how to use w._vtm as the hint?

Yes, that should work without too much effort.
If there were M preferred workers out of N total workers, then rdvtm could perform random selection alternatively from M preferred and then N total workers to steal work from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants