mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: cache workbufs on Ms and add consistency checks
Add local workbufs to the m struct in order to reduce contention. Add consistency checks for workbuf ownership. Chain workbufs through call change to avoid swapping them to and from the m struct. Adjust the size of the workbuf so that the mutators can more frequently pass modifications to the GC thus shifting some work from the STW mark termination phase to the concurrent mark phase. Change-Id: I557b53af34ad9972265e0ed9f5996e52d548563d Reviewed-on: https://go-review.googlesource.com/3972 Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
59495e8dfd
commit
a15818fed3
3 changed files with 350 additions and 111 deletions
|
|
@ -274,6 +274,7 @@ type m struct {
|
|||
waitsemacount uint32
|
||||
waitsemalock uint32
|
||||
gcstats gcstats
|
||||
currentwbuf uintptr // use locks or atomic operations such as xchguinptr to access.
|
||||
needextram bool
|
||||
traceback uint8
|
||||
waitunlockf unsafe.Pointer // todo go func(*g, unsafe.pointer) bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue