diff options
| author | Michael Anthony Knyszek <mknyszek@google.com> | 2019-09-18 15:57:36 +0000 |
|---|---|---|
| committer | Michael Knyszek <mknyszek@google.com> | 2019-11-08 17:01:32 +0000 |
| commit | 4517c02f284cc19262304ba22c1c98b2bbdb0208 (patch) | |
| tree | afd70218f58aa49b881c2d5335ccb1a6ffe92e04 /src/encoding/binary/binary_test.go | |
| parent | a762221bea7c02a17cffc6937d8af33a027a32e5 (diff) | |
| download | go-4517c02f284cc19262304ba22c1c98b2bbdb0208.tar.xz | |
runtime: add per-p mspan cache
This change adds a per-p mspan object cache similar to the sudog cache.
Unfortunately this cache can't quite operate like the sudog cache, since
it is used in contexts where write barriers are disallowed (i.e.
allocation codepaths), so rather than managing an array and a slice,
it's just an array and a length. A little bit more unsafe, but avoids
any write barriers.
The purpose of this change is to reduce the number of operations which
require the heap lock in allocation, paving the way for a lockless fast
path.
Updates #35112.
Change-Id: I32cfdcd8528fb7be985640e4f3a13cb98ffb7865
Reviewed-on: https://go-review.googlesource.com/c/go/+/196642
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/encoding/binary/binary_test.go')
0 files changed, 0 insertions, 0 deletions
