]> Cypherpunks repositories - gostls13.git/commit
runtime: eliminate contention during stack allocation
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 12 Jul 2011 16:24:32 +0000 (09:24 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 12 Jul 2011 16:24:32 +0000 (09:24 -0700)
commitc9152a8568fd49b2e7a5dd689005098487a6178d
tree8a964f4944586a6ea83885bcfecefb055eedbfd4
parentdaaf29cf9320011af9b5feee36f75cb2ac175718
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
src/pkg/runtime/malloc.goc
src/pkg/runtime/malloc.h
src/pkg/runtime/proc.c
src/pkg/runtime/proc_test.go
src/pkg/runtime/runtime.h
src/pkg/runtime/stack.h