From 77fcf36a5ece3eb2a3c2a427d0b63f417ae7c8c8 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 12 Mar 2015 13:03:50 -0400 Subject: [PATCH] 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 --- src/runtime/mgcmark.go | 1 - 1 file changed, 1 deletion(-) diff --git a/src/runtime/mgcmark.go b/src/runtime/mgcmark.go index 1be69fe062..a5ec31c30c 100644 --- a/src/runtime/mgcmark.go +++ b/src/runtime/mgcmark.go @@ -56,7 +56,6 @@ var oneptr = [...]uint8{typePointer} //go:nowritebarrier func markroot(desc *parfor, i uint32) { var gcw gcWorkProducer - gcw.initFromCache() // Note: if you add a case here, please also update heapdump.go:dumproots. switch i { -- 2.48.1