]> Cypherpunks repositories - gostls13.git/commit
runtime: don't use cached wbuf in markroot
authorAustin Clements <austin@google.com>
Thu, 12 Mar 2015 17:03:50 +0000 (13:03 -0400)
committerAustin Clements <austin@google.com>
Thu, 19 Mar 2015 15:55:16 +0000 (15:55 +0000)
commit77fcf36a5ece3eb2a3c2a427d0b63f417ae7c8c8
tree0885f7416f3c70cff9e8ee9ee3f31f2ccc2d59bf
parentfa2f9c2c0923edf539cdcce82473e7131826d677
runtime: don't use cached wbuf in markroot

Currently markroot fetches the wbuf to fill from the per-M wbuf
cache. The wbuf cache is primarily meant for the write barrier because
it produces very little work on each call. There's little point to
using the cache in mark root, since each call to markroot is likely to
produce a large amount of work (so the slight win on getting it from
the cache instead of from the central wbuf lists doesn't matter), and
markroot does not dispose the wbuf back to the cache (so most markroot
calls won't get anything from the wbuf cache anyway).

Instead, just get the wbuf from the central wbuf lists like other work
producers. This will simplify later changes.

Change-Id: I07a18a4335a41e266a6d70aa3a0911a40babce23
Reviewed-on: https://go-review.googlesource.com/7732
Reviewed-by: Rick Hudson <rlh@golang.org>
src/runtime/mgcmark.go