]> Cypherpunks repositories - gostls13.git/commit
runtime: per-P defer pool
authorDmitriy Vyukov <dvyukov@google.com>
Tue, 21 Jan 2014 07:20:23 +0000 (11:20 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Tue, 21 Jan 2014 07:20:23 +0000 (11:20 +0400)
commit1ba04c171a3c3a1ea0e5157e8340b606ec9d8949
tree4f83adad4db1e331a5cc4b6d32643e176fb4ea57
parentabd588aa835fa3f462640cc8eba6d192a8462667
runtime: per-P defer pool
Instead of a per-goroutine stack of defers for all sizes,
introduce per-P defer pool for argument sizes 8, 24, 40, 56, 72 bytes.

For a program that starts 1e6 goroutines and then joins then:
old: rss=6.6g virtmem=10.2g time=4.85s
new: rss=4.5g virtmem= 8.2g time=3.48s

R=golang-codereviews, rsc
CC=golang-codereviews
https://golang.org/cl/42750044
src/pkg/runtime/cgocall.c
src/pkg/runtime/mgc0.c
src/pkg/runtime/msize.c
src/pkg/runtime/panic.c
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.h