Open prattmic opened 4 years ago
With your change to startm
to reserve an ID while holding sched.lock
, is the logic in sysmon
even necessary?
I'm almost certain that the incidlelocked
logic in sysmon
is unnecessary after my change. There is similar logic in retake
that I'll need to look at more closely.
Bumping to 1.17, but @prattmic, please bump to Backlog if you don't plan on working on this in 1.17.
@prattmic Is anything going to happen in 1.17? If not, we should change the milestone to Backlog. Thanks.
In #40368, I avoided false deadlocks from
startm
insysmon
by reserving M ids in advance to make it look like the new M is already running tocheckdead
.Later, I discovered that @dvyukov fixed a nearly identical issue in #6070 by temporarily decrementing the number of idle locked M's, to make checkdead see an extra M. Slightly different approach, but same end result.
We should merge these two approaches back to one just to keep things simpler and easier to understand.
cc @aclements @mknyszek @ianlancetaylor