-
Notifications
You must be signed in to change notification settings - Fork 316
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: switch to yastl thread pool #1483
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.
Looks good to me
@@ -59,6 +60,8 @@ lazy_static! { | |||
/// It might be possible to relax this constraint, but in that case, only one builder | |||
/// should actually be active at any given time, so the mutex should still be used. | |||
static ref GPU_LOCK: Mutex<()> = Mutex::new(()); | |||
|
|||
static ref THREAD_POOL: Pool = Pool::new(num_cpus::get()); |
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.
Here you are using num_cpus::get()
whereas in bellperson
you are using an env-var BELLMAN_NUM_CPUS
to get the number of CPU's, should these two values always agree?
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.
No, I don't think so. The bellman var is bellman specific, and that's ok. If we had a proofs specific one, it might be different, but proofs generally targets max parallelism from the available cores.
3983d18
to
b80dede
Compare
This avoids all deadlocks as so far observed. Also uses a more flexible channel for sync
b80dede
to
3a1b7d2
Compare
Final testing is happening, but in fact, I have a machine that reliably hangs now during tests without this fix. Performance has so far been measured to be 'about the same' to 'a hair faster'. When my last test completes, assuming perf hasn't degraded after the rebases to latest, I'll merge. |
This reverts commit bde2c88.
This reverts commit bde2c88.
This reverts commit bde2c88.
This avoids all deadlocks as so far observed. Also uses a more flexible channel
for sync
Depends on filecoin-project/bellperson#204