sched: add missing check for non-multicore thread availability
This commit is contained in:
parent
38cf04b888
commit
dd23715942
5
sched.go
5
sched.go
@ -373,6 +373,11 @@ func canHandleRequest(needRes Resources, spt abi.RegisteredProof, wid WorkerID,
|
||||
log.Debugf("sched: not scheduling on worker %d; multicore process needs %d threads, %d in use, target %d", wid, res.CPUs, active.cpuUse, res.CPUs)
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
if active.cpuUse + uint64(needRes.Threads) > res.CPUs {
|
||||
log.Debugf("sched: not scheduling on worker %d; not enough threads, need %d, %d in use, target %d", wid, needRes.Threads, active.cpuUse, res.CPUs)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if len(res.GPUs) > 0 && needRes.CanGPU {
|
||||
|
Loading…
Reference in New Issue
Block a user