-
-
Notifications
You must be signed in to change notification settings - Fork 73
Force reschedule in adjust_pressure! #284
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
Codecov Report
@@ Coverage Diff @@
## master #284 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 35 35
Lines 2912 2913 +1
======================================
- Misses 2912 2913 +1
Continue to review full report at Codecov.
|
3f66902
to
19d9bd5
Compare
So here the latest status is that against all logic this piece below in if pressure > 0
put!(state.chan, RescheduleSignal())
end |
@jpsamaroo new findings based on this example
so the state at which the thing hangs is that:
now i don't have any idea why does it land in btw not using the put! reschedule signal in adjust pressure for this investigation |
Ok looked into it more, I see nothing weird about it, it's just stuck here: Line 401 in 19d9bd5
The below works fine for me, the condition on notify(TASK_SYNC) breaks things. "Adjusts the scheduler's cached pressure indicator for the specified worker by
the specified amount."
function adjust_pressure!(h::SchedulerHandle, proctype::Type, pressure)
uid = Dagger.get_tls().sch_uid
lock(TASK_SYNC) do
PROC_UTILIZATION[uid][proctype][] += pressure
notify(TASK_SYNC)
end
exec!(_adjust_pressure!, h, myid(), proctype, pressure)
end
function _adjust_pressure!(ctx, state, task, tid, (pid, proctype, pressure))
state.worker_pressure[pid][proctype] += pressure
pressure < 0 && put!(state.chan, RescheduleSignal())
nothing
end |
Being stuck on
Yeah |
So I guess the question is whether adjust_pressure is the optimal place to put that RescheduleSignal. |
Should we merge this already? function _adjust_pressure!(ctx, state, task, tid, (pid, proctype, pressure))
state.worker_pressure[pid][proctype] += pressure
pressure < 0 && put!(state.chan, RescheduleSignal())
nothing
end |
Co-authored-by: krynju <[email protected]>
19d9bd5
to
91ba229
Compare
Co-authored-by: krynju <[email protected]>
Thanks for the help with this @krynju ! |
(Hopefully) fixes #282
Thanks to @krynju for narrowing this one down!