Skip to content

Commit

Permalink
runtime: add partial lock order between mspanSpecial and gcBitsArenas
Browse files Browse the repository at this point in the history
CL 493275 started using gcBits for pinner bits. This means gcBits can be
allocated while holding the mspanSpecial lock. This is safe because
these were just parallel in the partial order, but now they need an
explicit edge between them.

For #58277.

Change-Id: I37917730e12d59cf0580f198d732198413a56424
Reviewed-on: https://go-review.googlesource.com/c/go/+/497475
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
  • Loading branch information
mknyszek committed May 23, 2023
1 parent 45b74d2 commit 807cce4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
26 changes: 13 additions & 13 deletions src/runtime/lockrank.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/runtime/mklockrank.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ allg,
< MALLOC
# Below MALLOC is the malloc implementation.
< fin,
gcBitsArenas,
spanSetSpine,
mspanSpecial,
MPROF;
# We can acquire gcBitsArenas for pinner bits, and
# it's guarded by mspanSpecial.
MALLOC, mspanSpecial < gcBitsArenas;
# Memory profiling
MPROF < profInsert, profBlock, profMemActive;
profMemActive < profMemFuture;
Expand Down

0 comments on commit 807cce4

Please sign in to comment.