diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2011-07-12 09:24:32 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-07-12 09:24:32 -0700 |
| commit | c9152a8568fd49b2e7a5dd689005098487a6178d (patch) | |
| tree | 8a964f4944586a6ea83885bcfecefb055eedbfd4 /src/pkg/runtime/runtime.h | |
| parent | daaf29cf9320011af9b5feee36f75cb2ac175718 (diff) | |
| download | go-c9152a8568fd49b2e7a5dd689005098487a6178d.tar.xz | |
runtime: eliminate contention during stack allocation
Standard-sized stack frames use plain malloc/free
instead of centralized lock-protected FixAlloc.
Benchmark results on HP Z600 (2 x Xeon E5620, 8 HT cores, 2.40GHz)
are as follows:
benchmark old ns/op new ns/op delta
BenchmarkStackGrowth 1045.00 949.00 -9.19%
BenchmarkStackGrowth-2 3450.00 800.00 -76.81%
BenchmarkStackGrowth-4 5076.00 513.00 -89.89%
BenchmarkStackGrowth-8 7805.00 471.00 -93.97%
BenchmarkStackGrowth-16 11751.00 321.00 -97.27%
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4657091
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 83ea0f9ce2..de0a21b956 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -57,6 +57,7 @@ typedef struct String String; typedef struct Usema Usema; typedef struct SigTab SigTab; typedef struct MCache MCache; +typedef struct FixAlloc FixAlloc; typedef struct Iface Iface; typedef struct Itab Itab; typedef struct Eface Eface; @@ -236,6 +237,7 @@ struct M M* schedlink; uint32 machport; // Return address for Mach IPC (OS X) MCache *mcache; + FixAlloc *stackalloc; G* lockedg; G* idleg; uint32 freglo[16]; // D[i] lsb and F[i] |
