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

Starved workers are busy hunting for a job #108

Open
art-w opened this issue Apr 25, 2023 · 1 comment
Open

Starved workers are busy hunting for a job #108

art-w opened this issue Apr 25, 2023 · 1 comment

Comments

@art-w
Copy link
Contributor

art-w commented Apr 25, 2023

@barko reported that this short test can reach 100% cpu activity even though the domains spend their time sleeping. According to perf and a quick investigation, it seems that the issue is this spin in Multi_channel: When a worker is starving for a job, it busy waits for up to 1ms.

A quick fix would be to reduce the 2048 allowed iterations to a much smaller number (it's * nb_domains with recv_poll_loop, so it also gets worse as the number of cores grows).

(cc @lyrm since you also abhor spinlocks, the array of workstealing queues looks like a good opportunity for a fancy lock'n'lockfree datastructure combination!)

@kayceesrk
Copy link
Contributor

kayceesrk commented Apr 25, 2023

CC @polytypic.

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

No branches or pull requests

2 participants