-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix JULIA_EXCLUSIVE setting affinity on non-worker threads #57136
Fix JULIA_EXCLUSIVE setting affinity on non-worker threads #57136
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is a little odd to me - e.g. if nthreadsi == 1
and nmutator_threads == 2
we no longer end up setting affinity for any thread
Is that intentional?
It was not intentional! It should be fixed now:
|
fee6b4a
to
e8a391a
Compare
@@ -2058,6 +2058,9 @@ extern JL_DLLIMPORT _Atomic(int) jl_n_threads; | |||
extern JL_DLLIMPORT int jl_n_gcthreads; | |||
extern int jl_n_markthreads; | |||
extern int jl_n_sweepthreads; | |||
|
|||
#define JL_THREADPOOL_ID_INTERACTIVE 0 | |||
#define JL_THREADPOOL_ID_DEFAULT 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I am well known for my hatred of magic integer constants).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
ad2c2cd
to
3814673
Compare
Git history and diff seem to be messed up |
With JULIA_EXCLUSIVE=1, we would try to give both worker and interactive threads an exclusive CPU, causing --threads=auto to produce a "Too many threads requested" error. Fixes JuliaLang#50702.
3814673
to
ce5a687
Compare
Our CI seems to have fallen over, but this has passed tests repeatedly on all platforms so I'll go ahead and merge it. Thanks @xal-0 ! |
With JULIA_EXCLUSIVE=1, we would try to give both worker and interactive threads an exclusive CPU, causing --threads=auto to produce a "Too many threads requested" error.
Fixes #50702.