diff options
| author | Rick Hudson <rlh@golang.org> | 2015-07-29 12:03:54 -0400 |
|---|---|---|
| committer | Rick Hudson <rlh@golang.org> | 2015-07-29 18:56:11 +0000 |
| commit | e95bc5fef7e5e21cfdcae3095fcb8280bc3a72f8 (patch) | |
| tree | 3870fc942f8d6d635290e5d85f38f12d140cb151 /src/runtime/runtime2.go | |
| parent | ff991940f167030daec0e0342199f52a94e3e8fc (diff) | |
| download | go-e95bc5fef7e5e21cfdcae3095fcb8280bc3a72f8.tar.xz | |
runtime: force mutator to give work buffer to GC
The scheduler, work buffer's dispose, and write barriers
can conspire to hide the a pointer from the GC's concurent
mark phase. If this pointer is the only path to a large
amount of marking the STW mark termination phase may take
a lot of time.
Consider the following:
1) dispose places a work buffer on the partial queue
2) the GC is busy so it does not immediately remove and
process the work buffer
3) the scheduler runs a mutator whose write barrier dequeues the
work buffer from the partial queue so the GC won't see it
This repeats until the GC reaches the mark termination
phase where the GC finally discovers the pointer along
with a lot of work to do.
This CL fixes the problem by having the mutator
dispose of the buffer to the full queue instead of
the partial queue. Since the write buffer never asks for full
buffers the conspiracy described above is not possible.
Updates #11694.
Change-Id: I2ce832f9657a7570f800e8ce4459cd9e304ef43b
Reviewed-on: https://go-review.googlesource.com/12840
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/runtime2.go')
0 files changed, 0 insertions, 0 deletions
