]> Cypherpunks repositories - gostls13.git/commit
runtime: introduce higher-level GC work abstraction
authorAustin Clements <austin@google.com>
Thu, 12 Feb 2015 17:53:48 +0000 (12:53 -0500)
committerAustin Clements <austin@google.com>
Thu, 19 Feb 2015 16:59:26 +0000 (16:59 +0000)
commitb30d19de59cc43723573af06ec2df8aaf053c0b8
tree60734a8cc3591c42879a3f4fe1165a666f327c6d
parent1b205857a46d0241a980c1c8e548ad2e225bcbb8
runtime: introduce higher-level GC work abstraction

This introduces a producer/consumer abstraction for GC work pointers
that internally handles the details of filling, draining, and
shuffling work buffers.

In addition to simplifying the GC code, this should make it easy for
us to change how we use work buffers, including cleaning up how we use
the work.partial queue, reintroducing a FIFO lookahead cache, adding
prefetching, and using dual buffers to avoid flapping.

This commit doesn't change any existing code.  The following commit
will switch the garbage collector from explicit workbuf manipulation
to gcWork.

Change-Id: Ifbfe5fff45bf0362d6d7c3cecb061f0c9874077d
Reviewed-on: https://go-review.googlesource.com/5231
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgc.go
src/runtime/mgcwork.go