Skip to content

Commit 807cce4

Browse files
committed
runtime: add partial lock order between mspanSpecial and gcBitsArenas
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 <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: David Chase <[email protected]>
1 parent 45b74d2 commit 807cce4

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

src/runtime/lockrank.go

+13-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/runtime/mklockrank.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,14 @@ allg,
109109
< MALLOC
110110
# Below MALLOC is the malloc implementation.
111111
< fin,
112-
gcBitsArenas,
113112
spanSetSpine,
114113
mspanSpecial,
115114
MPROF;
116115
116+
# We can acquire gcBitsArenas for pinner bits, and
117+
# it's guarded by mspanSpecial.
118+
MALLOC, mspanSpecial < gcBitsArenas;
119+
117120
# Memory profiling
118121
MPROF < profInsert, profBlock, profMemActive;
119122
profMemActive < profMemFuture;

0 commit comments

Comments
 (0)