-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix thread priority problems on windows #2906
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
Conversation
|
bors try |
|
bors try |
tryAlready running a review |
|
bors try |
tryAlready running a review |
|
Would it make sense to reduce the priority of the thread pool threads instead? This way it would work on other platforms, too. |
tryBuild failed
|
|
bors try I would have lowered thread pool priority, but there’s no easy api to customize thread creation. But it seems to be orthogonal to being cross platform? Ideally, I’d prefer to not tweak propiorities at all and just rely on fairness, but on windows we specifically hit an unfair case. |
tryAlready running a review |
tryTimed out |
|
bors r+ |
Build succeeded
|
Ah, I missed that. I know that some crates like
On Linux you can decrease a thread's priority (nice), but not increase it unless you have In general, I wouldn't expect schedulers to be fair. They're a mess of heuristics (like the priority boosting that Windows does in some cases) that either improve responsiveness or throughput. In the recent discussion about user-space spinlocks, Torvalds pointed out that fairness is bad for throughput, on smaller systems, but:
|
No description provided.