Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(111)

Issue 4711045: code review 4711045: runtime: improve Linux mutex (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 1 month ago by dvyukov
Modified:
15 years ago
Reviewers:
CC:
rsc, iant, msolo, fw, iant2, golang-dev
Visibility:
Public.

Description

runtime: improve Linux mutex The implementation is hybrid active/passive spin/blocking mutex. The design minimizes amount of context switches and futex calls. The idea is that all critical sections in runtime are intentially small, so pure blocking mutex behaves badly causing a lot of context switches, thread parking/unparking and kernel calls. Note that some synthetic benchmarks become somewhat slower, that's due to increased contention on other data structures, it should not affect programs that do any real work. On 2 x Intel E5620, 8 HT cores, 2.4GHz benchmark old ns/op new ns/op delta BenchmarkSelectContended 521.00 503.00 -3.45% BenchmarkSelectContended-2 661.00 320.00 -51.59% BenchmarkSelectContended-4 1139.00 629.00 -44.78% BenchmarkSelectContended-8 2870.00 878.00 -69.41% BenchmarkSelectContended-16 5276.00 818.00 -84.50% BenchmarkChanContended 112.00 103.00 -8.04% BenchmarkChanContended-2 631.00 174.00 -72.42% BenchmarkChanContended-4 682.00 272.00 -60.12% BenchmarkChanContended-8 1601.00 520.00 -67.52% BenchmarkChanContended-16 3100.00 372.00 -88.00% BenchmarkChanSync 253.00 239.00 -5.53% BenchmarkChanSync-2 5030.00 4648.00 -7.59% BenchmarkChanSync-4 4826.00 4694.00 -2.74% BenchmarkChanSync-8 4778.00 4713.00 -1.36% BenchmarkChanSync-16 5289.00 4710.00 -10.95% BenchmarkChanProdCons0 273.00 254.00 -6.96% BenchmarkChanProdCons0-2 599.00 400.00 -33.22% BenchmarkChanProdCons0-4 1168.00 659.00 -43.58% BenchmarkChanProdCons0-8 2831.00 1057.00 -62.66% BenchmarkChanProdCons0-16 4197.00 1037.00 -75.29% BenchmarkChanProdCons10 150.00 140.00 -6.67% BenchmarkChanProdCons10-2 607.00 268.00 -55.85% BenchmarkChanProdCons10-4 1137.00 404.00 -64.47% BenchmarkChanProdCons10-8 2115.00 828.00 -60.85% BenchmarkChanProdCons10-16 4283.00 855.00 -80.04% BenchmarkChanProdCons100 117.00 110.00 -5.98% BenchmarkChanProdCons100-2 558.00 218.00 -60.93% BenchmarkChanProdCons100-4 722.00 287.00 -60.25% BenchmarkChanProdCons100-8 1840.00 431.00 -76.58% BenchmarkChanProdCons100-16 3394.00 448.00 -86.80% BenchmarkChanProdConsWork0 2014.00 1996.00 -0.89% BenchmarkChanProdConsWork0-2 1207.00 1127.00 -6.63% BenchmarkChanProdConsWork0-4 1913.00 611.00 -68.06% BenchmarkChanProdConsWork0-8 3016.00 949.00 -68.53% BenchmarkChanProdConsWork0-16 4320.00 1154.00 -73.29% BenchmarkChanProdConsWork10 1906.00 1897.00 -0.47% BenchmarkChanProdConsWork10-2 1123.00 1033.00 -8.01% BenchmarkChanProdConsWork10-4 1076.00 571.00 -46.93% BenchmarkChanProdConsWork10-8 2748.00 1096.00 -60.12% BenchmarkChanProdConsWork10-16 4600.00 1105.00 -75.98% BenchmarkChanProdConsWork100 1884.00 1852.00 -1.70% BenchmarkChanProdConsWork100-2 1235.00 1146.00 -7.21% BenchmarkChanProdConsWork100-4 1217.00 619.00 -49.14% BenchmarkChanProdConsWork100-8 1534.00 509.00 -66.82% BenchmarkChanProdConsWork100-16 4126.00 918.00 -77.75% BenchmarkSyscall 34.40 33.30 -3.20% BenchmarkSyscall-2 160.00 121.00 -24.38% BenchmarkSyscall-4 131.00 136.00 +3.82% BenchmarkSyscall-8 139.00 131.00 -5.76% BenchmarkSyscall-16 161.00 168.00 +4.35% BenchmarkSyscallWork 950.00 950.00 +0.00% BenchmarkSyscallWork-2 481.00 480.00 -0.21% BenchmarkSyscallWork-4 268.00 270.00 +0.75% BenchmarkSyscallWork-8 156.00 169.00 +8.33% BenchmarkSyscallWork-16 188.00 184.00 -2.13% BenchmarkSemaSyntNonblock 36.40 35.60 -2.20% BenchmarkSemaSyntNonblock-2 81.40 45.10 -44.59% BenchmarkSemaSyntNonblock-4 126.00 108.00 -14.29% BenchmarkSemaSyntNonblock-8 112.00 112.00 +0.00% BenchmarkSemaSyntNonblock-16 110.00 112.00 +1.82% BenchmarkSemaSyntBlock 35.30 35.30 +0.00% BenchmarkSemaSyntBlock-2 118.00 124.00 +5.08% BenchmarkSemaSyntBlock-4 105.00 108.00 +2.86% BenchmarkSemaSyntBlock-8 101.00 111.00 +9.90% BenchmarkSemaSyntBlock-16 112.00 118.00 +5.36% BenchmarkSemaWorkNonblock 810.00 811.00 +0.12% BenchmarkSemaWorkNonblock-2 476.00 414.00 -13.03% BenchmarkSemaWorkNonblock-4 238.00 228.00 -4.20% BenchmarkSemaWorkNonblock-8 140.00 126.00 -10.00% BenchmarkSemaWorkNonblock-16 117.00 116.00 -0.85% BenchmarkSemaWorkBlock 810.00 811.00 +0.12% BenchmarkSemaWorkBlock-2 454.00 466.00 +2.64% BenchmarkSemaWorkBlock-4 243.00 241.00 -0.82% BenchmarkSemaWorkBlock-8 145.00 137.00 -5.52% BenchmarkSemaWorkBlock-16 132.00 123.00 -6.82% BenchmarkContendedSemaphore 123.00 102.00 -17.07% BenchmarkContendedSemaphore-2 34.80 34.90 +0.29% BenchmarkContendedSemaphore-4 34.70 34.80 +0.29% BenchmarkContendedSemaphore-8 34.70 34.70 +0.00% BenchmarkContendedSemaphore-16 34.80 34.70 -0.29% BenchmarkMutex 26.80 26.00 -2.99% BenchmarkMutex-2 108.00 45.20 -58.15% BenchmarkMutex-4 103.00 127.00 +23.30% BenchmarkMutex-8 109.00 147.00 +34.86% BenchmarkMutex-16 102.00 152.00 +49.02% BenchmarkMutexSlack 27.00 26.90 -0.37% BenchmarkMutexSlack-2 149.00 165.00 +10.74% BenchmarkMutexSlack-4 121.00 209.00 +72.73% BenchmarkMutexSlack-8 101.00 158.00 +56.44% BenchmarkMutexSlack-16 97.00 129.00 +32.99% BenchmarkMutexWork 792.00 794.00 +0.25% BenchmarkMutexWork-2 407.00 409.00 +0.49% BenchmarkMutexWork-4 220.00 209.00 -5.00% BenchmarkMutexWork-8 267.00 160.00 -40.07% BenchmarkMutexWork-16 315.00 300.00 -4.76% BenchmarkMutexWorkSlack 792.00 793.00 +0.13% BenchmarkMutexWorkSlack-2 406.00 404.00 -0.49% BenchmarkMutexWorkSlack-4 225.00 212.00 -5.78% BenchmarkMutexWorkSlack-8 268.00 136.00 -49.25% BenchmarkMutexWorkSlack-16 300.00 300.00 +0.00% BenchmarkRWMutexWrite100 27.10 27.00 -0.37% BenchmarkRWMutexWrite100-2 33.10 40.80 +23.26% BenchmarkRWMutexWrite100-4 113.00 88.10 -22.04% BenchmarkRWMutexWrite100-8 119.00 95.30 -19.92% BenchmarkRWMutexWrite100-16 148.00 109.00 -26.35% BenchmarkRWMutexWrite10 29.60 29.40 -0.68% BenchmarkRWMutexWrite10-2 111.00 61.40 -44.68% BenchmarkRWMutexWrite10-4 270.00 208.00 -22.96% BenchmarkRWMutexWrite10-8 204.00 185.00 -9.31% BenchmarkRWMutexWrite10-16 261.00 190.00 -27.20% BenchmarkRWMutexWorkWrite100 1040.00 1036.00 -0.38% BenchmarkRWMutexWorkWrite100-2 593.00 580.00 -2.19% BenchmarkRWMutexWorkWrite100-4 470.00 365.00 -22.34% BenchmarkRWMutexWorkWrite100-8 468.00 289.00 -38.25% BenchmarkRWMutexWorkWrite100-16 604.00 374.00 -38.08% BenchmarkRWMutexWorkWrite10 951.00 951.00 +0.00% BenchmarkRWMutexWorkWrite10-2 1001.00 928.00 -7.29% BenchmarkRWMutexWorkWrite10-4 1555.00 1006.00 -35.31% BenchmarkRWMutexWorkWrite10-8 2085.00 1171.00 -43.84% BenchmarkRWMutexWorkWrite10-16 2082.00 1614.00 -22.48%

Patch Set 1 #

Patch Set 2 : diff -r dd24571e45dc https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r dd24571e45dc https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r d5d51bacde3f https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 89c7137ea35c https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r a4c2e46af9b2 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 1bd754e69ce7 https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r 1bd754e69ce7 https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 9 : diff -r 627c9b93bae9 https://go.googlecode.com/hg/ #

Patch Set 10 : diff -r 627c9b93bae9 https://go.googlecode.com/hg/ #

Patch Set 11 : diff -r 627c9b93bae9 https://go.googlecode.com/hg/ #

Patch Set 12 : diff -r 627c9b93bae9 https://go.googlecode.com/hg/ #

Patch Set 13 : diff -r 627c9b93bae9 https://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 14 : diff -r 627c9b93bae9 https://go.googlecode.com/hg/ #

Patch Set 15 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Patch Set 16 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Patch Set 17 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 18 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Patch Set 19 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Patch Set 20 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Patch Set 21 : diff -r c162ec4be385 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -91 lines) Patch
M src/cmd/6a/lex.c View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6l/6.out.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6l/optab.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8a/lex.c View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8l/8.out.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8l/optab.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/386/asm.s View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M src/pkg/runtime/amd64/asm.s View 1 2 3 4 1 chunk +14 lines, -0 lines 0 comments Download
M src/pkg/runtime/arm/atomic.c View 1 2 3 4 1 chunk +23 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/386/defs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/386/sys.s View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +28 lines, -1 line 0 comments Download
M src/pkg/runtime/linux/amd64/defs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/amd64/sys.s View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +18 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/arm/defs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/arm/sys.s View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +30 lines, -0 lines 0 comments Download
M src/pkg/runtime/linux/thread.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +109 lines, -89 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +8 lines, -1 line 0 comments Download
M src/pkg/runtime/string.goc View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 41
dvyukov
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
15 years ago (2011-07-21 18:05:45 UTC) #1
rsc
I am afraid of sacrificing the GOMAXPROCS=1 case for performance in the other cases. Does ...
15 years ago (2011-07-21 18:09:46 UTC) #2
dvyukov
On 2011/07/21 18:09:46, rsc wrote: > I am afraid of sacrificing the GOMAXPROCS=1 case > ...
15 years ago (2011-07-21 19:38:00 UTC) #3
iant
FYI http://codereview.appspot.com/4711045/diff/22001/src/pkg/runtime/linux/386/sys.s File src/pkg/runtime/linux/386/sys.s (right): http://codereview.appspot.com/4711045/diff/22001/src/pkg/runtime/linux/386/sys.s#newcode320 src/pkg/runtime/linux/386/sys.s:320: MOVL $24, AX For 32-bit GNU/Linux sched_yield is ...
15 years ago (2011-07-22 05:38:06 UTC) #4
dvyukov
On 2011/07/22 05:38:06, iant wrote: > FYI > > http://codereview.appspot.com/4711045/diff/22001/src/pkg/runtime/linux/386/sys.s > File src/pkg/runtime/linux/386/sys.s (right): > ...
15 years ago (2011-07-22 13:53:44 UTC) #5
dvyukov
Hello golang-dev@googlegroups.com, rsc@golang.org, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-07-22 13:54:08 UTC) #6
iant
FYI Thanks for the explanation. The code looks OK to me as far as I ...
15 years ago (2011-07-22 15:00:43 UTC) #7
msolo
FYI I patched this into a pre-production test of a server app I've been working ...
15 years ago (2011-07-22 18:27:37 UTC) #8
dvyukov
On 2011/07/22 18:27:37, msolo wrote: > FYI > > I patched this into a pre-production ...
15 years ago (2011-07-22 18:42:05 UTC) #9
dvyukov
Hello golang-dev@googlegroups.com, rsc@golang.org, iant@golang.org, msolo@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-07-22 19:24:15 UTC) #10
dvyukov
Note that I've added XORQ DX,DX to runtime.write(). Can't it be so that high 32 ...
15 years ago (2011-07-22 19:26:45 UTC) #11
fw
> Note that I've added XORQ DX,DX to runtime.write(). Can't it be so that > ...
15 years ago (2011-07-22 20:02:06 UTC) #12
dvyukov
On 2011/07/22 20:02:06, fw_deneb.enyo.de wrote: > > Note that I've added XORQ DX,DX to runtime.write(). ...
15 years ago (2011-07-22 20:48:45 UTC) #13
iant
On amd64 a 32-bit load to a 64-bit register zero extends.
15 years ago (2011-07-22 21:27:02 UTC) #14
fw
> On 2011/07/22 20:02:06, fw_deneb.enyo.de wrote: >> > Note that I've added XORQ DX,DX to ...
15 years ago (2011-07-23 07:01:06 UTC) #15
rsc
http://codereview.appspot.com/4711045/diff/9004/src/cmd/6l/optab.c File src/cmd/6l/optab.c (right): http://codereview.appspot.com/4711045/diff/9004/src/cmd/6l/optab.c#newcode536 src/cmd/6l/optab.c:536: uchar ypause[] = Delete; use ynone instead. http://codereview.appspot.com/4711045/diff/9004/src/cmd/8l/optab.c File ...
15 years ago (2011-07-24 20:14:53 UTC) #16
dvyukov
Hello rsc@golang.org, iant@golang.org, msolo@gmail.com, fw@deneb.enyo.de (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-07-25 16:34:55 UTC) #17
dvyukov
On 2011/07/22 21:27:02, iant wrote: > On amd64 a 32-bit load to a 64-bit register ...
15 years ago (2011-07-25 16:37:24 UTC) #18
dvyukov
> http://codereview.appspot.com/4711045/diff/9004/src/pkg/runtime/linux/thread.c#newcode121 > src/pkg/runtime/linux/thread.c:121: futexlock(Lock *l) > I find this function very difficult to read. ...
15 years ago (2011-07-25 16:44:18 UTC) #19
rsc
> It's not a standard algorithm. I've combined it from a known pieces. In > ...
15 years ago (2011-07-25 17:06:08 UTC) #20
rsc
http://codereview.appspot.com/4711045/diff/32003/src/pkg/runtime/linux/thread.c File src/pkg/runtime/linux/thread.c (right): http://codereview.appspot.com/4711045/diff/32003/src/pkg/runtime/linux/thread.c#newcode110 src/pkg/runtime/linux/thread.c:110: if(runtime·strstr(buf, (byte*)"SMP")) This checks whether an SMP kernel is ...
15 years ago (2011-07-25 17:12:04 UTC) #21
dvyukov
On 2011/07/25 17:06:08, rsc wrote: > > It's not a standard algorithm. I've combined it ...
15 years ago (2011-07-25 17:13:45 UTC) #22
rsc
do you agree that the comment does not describe the current code? if so, please ...
15 years ago (2011-07-25 17:25:40 UTC) #23
dvyukov
On 2011/07/25 17:12:04, rsc wrote: > http://codereview.appspot.com/4711045/diff/32003/src/pkg/runtime/linux/thread.c > File src/pkg/runtime/linux/thread.c (right): > > http://codereview.appspot.com/4711045/diff/32003/src/pkg/runtime/linux/thread.c#newcode110 > ...
15 years ago (2011-07-25 17:26:08 UTC) #24
rsc
> 1. Mutex is LOCKED by thread 0. > 2. Thread 1 tries to acquire ...
15 years ago (2011-07-25 17:29:44 UTC) #25
rsc
> Thread 1 was sleeping. It will not set the state to LOCKED. oh, i ...
15 years ago (2011-07-25 17:30:36 UTC) #26
rsc
On Mon, Jul 25, 2011 at 13:26, <dvyukov@google.com> wrote: > We can call sysconf(_SC_NPROCESSORS_ONLN), but ...
15 years ago (2011-07-25 17:38:45 UTC) #27
iant2
dvyukov@google.com writes: > On 2011/07/22 21:27:02, iant wrote: >> On amd64 a 32-bit load to ...
15 years ago (2011-07-25 18:21:20 UTC) #28
dvyukov
Hello rsc@golang.org, iant@golang.org, msolo@gmail.com, fw@deneb.enyo.de, iant@google.com (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-07-25 18:30:11 UTC) #29
dvyukov
On 2011/07/25 18:21:20, iant2 wrote: > mailto:dvyukov@google.com writes: > > > On 2011/07/22 21:27:02, iant ...
15 years ago (2011-07-25 18:30:55 UTC) #30
dvyukov
I've fixed what we discussed with Russ wrt missed wakeups. Now threads do long sleep ...
15 years ago (2011-07-25 18:32:29 UTC) #31
iant2
rsc@golang.org writes: > This checks whether an SMP kernel is being used. > That doesn't ...
15 years ago (2011-07-25 19:03:05 UTC) #32
rsc
> I've also fixed detection of SMP machine - I read /proc/stat and look > ...
15 years ago (2011-07-25 19:39:59 UTC) #33
dvyukov
On 2011/07/25 19:39:59, rsc wrote: > > I've also fixed detection of SMP machine - ...
15 years ago (2011-07-25 19:47:17 UTC) #34
rsc
> I need to add runtime.proccount(), right? no just leave everything as you have it ...
15 years ago (2011-07-25 19:48:07 UTC) #35
dvyukov
Hello rsc@golang.org, iant@golang.org, msolo@gmail.com, fw@deneb.enyo.de, iant@google.com (cc: golang-dev@googlegroups.com), Please take another look.
15 years ago (2011-07-26 12:01:23 UTC) #36
dvyukov
Btw, Russ, in your syscall CL you mentioned some "less artificial server benchmark". If you ...
15 years ago (2011-07-26 12:24:55 UTC) #37
rsc
On Tue, Jul 26, 2011 at 08:24, <dvyukov@google.com> wrote: > Btw, Russ, in your syscall ...
15 years ago (2011-07-26 14:54:33 UTC) #38
dvyukov
On 2011/07/26 14:54:33, rsc wrote: > On Tue, Jul 26, 2011 at 08:24, <mailto:dvyukov@google.com> wrote: ...
15 years ago (2011-07-28 10:27:48 UTC) #39
rsc
LGTM
15 years ago (2011-07-29 16:35:09 UTC) #40
rsc
15 years ago (2011-07-29 16:44:16 UTC) #41
*** Submitted as http://code.google.com/p/go/source/detail?r=3d02ca6a988b ***

runtime: improve Linux mutex
The implementation is hybrid active/passive spin/blocking mutex.
The design minimizes amount of context switches and futex calls.
The idea is that all critical sections in runtime are intentially
small, so pure blocking mutex behaves badly causing
a lot of context switches, thread parking/unparking and kernel calls.
Note that some synthetic benchmarks become somewhat slower,
that's due to increased contention on other data structures,
it should not affect programs that do any real work.

On 2 x Intel E5620, 8 HT cores, 2.4GHz
benchmark                     old ns/op    new ns/op    delta
BenchmarkSelectContended         521.00       503.00   -3.45%
BenchmarkSelectContended-2       661.00       320.00  -51.59%
BenchmarkSelectContended-4      1139.00       629.00  -44.78%
BenchmarkSelectContended-8      2870.00       878.00  -69.41%
BenchmarkSelectContended-16     5276.00       818.00  -84.50%
BenchmarkChanContended           112.00       103.00   -8.04%
BenchmarkChanContended-2         631.00       174.00  -72.42%
BenchmarkChanContended-4         682.00       272.00  -60.12%
BenchmarkChanContended-8        1601.00       520.00  -67.52%
BenchmarkChanContended-16       3100.00       372.00  -88.00%
BenchmarkChanSync                253.00       239.00   -5.53%
BenchmarkChanSync-2             5030.00      4648.00   -7.59%
BenchmarkChanSync-4             4826.00      4694.00   -2.74%
BenchmarkChanSync-8             4778.00      4713.00   -1.36%
BenchmarkChanSync-16            5289.00      4710.00  -10.95%
BenchmarkChanProdCons0           273.00       254.00   -6.96%
BenchmarkChanProdCons0-2         599.00       400.00  -33.22%
BenchmarkChanProdCons0-4        1168.00       659.00  -43.58%
BenchmarkChanProdCons0-8        2831.00      1057.00  -62.66%
BenchmarkChanProdCons0-16       4197.00      1037.00  -75.29%
BenchmarkChanProdCons10          150.00       140.00   -6.67%
BenchmarkChanProdCons10-2        607.00       268.00  -55.85%
BenchmarkChanProdCons10-4       1137.00       404.00  -64.47%
BenchmarkChanProdCons10-8       2115.00       828.00  -60.85%
BenchmarkChanProdCons10-16      4283.00       855.00  -80.04%
BenchmarkChanProdCons100         117.00       110.00   -5.98%
BenchmarkChanProdCons100-2       558.00       218.00  -60.93%
BenchmarkChanProdCons100-4       722.00       287.00  -60.25%
BenchmarkChanProdCons100-8      1840.00       431.00  -76.58%
BenchmarkChanProdCons100-16     3394.00       448.00  -86.80%
BenchmarkChanProdConsWork0      2014.00      1996.00   -0.89%
BenchmarkChanProdConsWork0-2    1207.00      1127.00   -6.63%
BenchmarkChanProdConsWork0-4    1913.00       611.00  -68.06%
BenchmarkChanProdConsWork0-8    3016.00       949.00  -68.53%
BenchmarkChanProdConsWork0-16   4320.00      1154.00  -73.29%
BenchmarkChanProdConsWork10     1906.00      1897.00   -0.47%
BenchmarkChanProdConsWork10-2   1123.00      1033.00   -8.01%
BenchmarkChanProdConsWork10-4   1076.00       571.00  -46.93%
BenchmarkChanProdConsWork10-8   2748.00      1096.00  -60.12%
BenchmarkChanProdConsWork10-16  4600.00      1105.00  -75.98%
BenchmarkChanProdConsWork100    1884.00      1852.00   -1.70%
BenchmarkChanProdConsWork100-2  1235.00      1146.00   -7.21%
BenchmarkChanProdConsWork100-4  1217.00       619.00  -49.14%
BenchmarkChanProdConsWork100-8  1534.00       509.00  -66.82%
BenchmarkChanProdConsWork100-16 4126.00       918.00  -77.75%
BenchmarkSyscall                  34.40        33.30   -3.20%
BenchmarkSyscall-2               160.00       121.00  -24.38%
BenchmarkSyscall-4               131.00       136.00   +3.82%
BenchmarkSyscall-8               139.00       131.00   -5.76%
BenchmarkSyscall-16              161.00       168.00   +4.35%
BenchmarkSyscallWork             950.00       950.00   +0.00%
BenchmarkSyscallWork-2           481.00       480.00   -0.21%
BenchmarkSyscallWork-4           268.00       270.00   +0.75%
BenchmarkSyscallWork-8           156.00       169.00   +8.33%
BenchmarkSyscallWork-16          188.00       184.00   -2.13%
BenchmarkSemaSyntNonblock         36.40        35.60   -2.20%
BenchmarkSemaSyntNonblock-2       81.40        45.10  -44.59%
BenchmarkSemaSyntNonblock-4      126.00       108.00  -14.29%
BenchmarkSemaSyntNonblock-8      112.00       112.00   +0.00%
BenchmarkSemaSyntNonblock-16     110.00       112.00   +1.82%
BenchmarkSemaSyntBlock            35.30        35.30   +0.00%
BenchmarkSemaSyntBlock-2         118.00       124.00   +5.08%
BenchmarkSemaSyntBlock-4         105.00       108.00   +2.86%
BenchmarkSemaSyntBlock-8         101.00       111.00   +9.90%
BenchmarkSemaSyntBlock-16        112.00       118.00   +5.36%
BenchmarkSemaWorkNonblock        810.00       811.00   +0.12%
BenchmarkSemaWorkNonblock-2      476.00       414.00  -13.03%
BenchmarkSemaWorkNonblock-4      238.00       228.00   -4.20%
BenchmarkSemaWorkNonblock-8      140.00       126.00  -10.00%
BenchmarkSemaWorkNonblock-16     117.00       116.00   -0.85%
BenchmarkSemaWorkBlock           810.00       811.00   +0.12%
BenchmarkSemaWorkBlock-2         454.00       466.00   +2.64%
BenchmarkSemaWorkBlock-4         243.00       241.00   -0.82%
BenchmarkSemaWorkBlock-8         145.00       137.00   -5.52%
BenchmarkSemaWorkBlock-16        132.00       123.00   -6.82%
BenchmarkContendedSemaphore      123.00       102.00  -17.07%
BenchmarkContendedSemaphore-2     34.80        34.90   +0.29%
BenchmarkContendedSemaphore-4     34.70        34.80   +0.29%
BenchmarkContendedSemaphore-8     34.70        34.70   +0.00%
BenchmarkContendedSemaphore-16    34.80        34.70   -0.29%
BenchmarkMutex                    26.80        26.00   -2.99%
BenchmarkMutex-2                 108.00        45.20  -58.15%
BenchmarkMutex-4                 103.00       127.00  +23.30%
BenchmarkMutex-8                 109.00       147.00  +34.86%
BenchmarkMutex-16                102.00       152.00  +49.02%
BenchmarkMutexSlack               27.00        26.90   -0.37%
BenchmarkMutexSlack-2            149.00       165.00  +10.74%
BenchmarkMutexSlack-4            121.00       209.00  +72.73%
BenchmarkMutexSlack-8            101.00       158.00  +56.44%
BenchmarkMutexSlack-16            97.00       129.00  +32.99%
BenchmarkMutexWork               792.00       794.00   +0.25%
BenchmarkMutexWork-2             407.00       409.00   +0.49%
BenchmarkMutexWork-4             220.00       209.00   -5.00%
BenchmarkMutexWork-8             267.00       160.00  -40.07%
BenchmarkMutexWork-16            315.00       300.00   -4.76%
BenchmarkMutexWorkSlack          792.00       793.00   +0.13%
BenchmarkMutexWorkSlack-2        406.00       404.00   -0.49%
BenchmarkMutexWorkSlack-4        225.00       212.00   -5.78%
BenchmarkMutexWorkSlack-8        268.00       136.00  -49.25%
BenchmarkMutexWorkSlack-16       300.00       300.00   +0.00%
BenchmarkRWMutexWrite100          27.10        27.00   -0.37%
BenchmarkRWMutexWrite100-2        33.10        40.80  +23.26%
BenchmarkRWMutexWrite100-4       113.00        88.10  -22.04%
BenchmarkRWMutexWrite100-8       119.00        95.30  -19.92%
BenchmarkRWMutexWrite100-16      148.00       109.00  -26.35%
BenchmarkRWMutexWrite10           29.60        29.40   -0.68%
BenchmarkRWMutexWrite10-2        111.00        61.40  -44.68%
BenchmarkRWMutexWrite10-4        270.00       208.00  -22.96%
BenchmarkRWMutexWrite10-8        204.00       185.00   -9.31%
BenchmarkRWMutexWrite10-16       261.00       190.00  -27.20%
BenchmarkRWMutexWorkWrite100    1040.00      1036.00   -0.38%
BenchmarkRWMutexWorkWrite100-2   593.00       580.00   -2.19%
BenchmarkRWMutexWorkWrite100-4   470.00       365.00  -22.34%
BenchmarkRWMutexWorkWrite100-8   468.00       289.00  -38.25%
BenchmarkRWMutexWorkWrite100-16  604.00       374.00  -38.08%
BenchmarkRWMutexWorkWrite10      951.00       951.00   +0.00%
BenchmarkRWMutexWorkWrite10-2   1001.00       928.00   -7.29%
BenchmarkRWMutexWorkWrite10-4   1555.00      1006.00  -35.31%
BenchmarkRWMutexWorkWrite10-8   2085.00      1171.00  -43.84%
BenchmarkRWMutexWorkWrite10-16  2082.00      1614.00  -22.48%

R=rsc, iant, msolo, fw, iant
CC=golang-dev
http://codereview.appspot.com/4711045

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b