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

Issue 5056045: code review 5056045: sync/atomic: replace MFENCE with LOCK XADD (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 11 months ago by dvyukov
Modified:
13 years, 11 months ago
Reviewers:
CC:
golang-dev, rsc, fhs
Visibility:
Public.

Description

sync/atomic: replace MFENCE with LOCK XADD MFENCE was introduced only on the Pentium4 (SSE2), while XADD was introduced on the 486. Fixes issue 2268.

Patch Set 1 #

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

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

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

Patch Set 5 : diff -r 8d5b60fed6b9 https://go.googlecode.com/hg/ #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -2 lines) Patch
M src/pkg/sync/atomic/asm_386.s View 1 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 6
dvyukov
Hello golang-dev@googlegroups.com (cc: fshahriar@gmail.com, golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 11 months ago (2011-09-18 20:22:38 UTC) #1
fhs
I have verified this fixes the issue. Thanks. fhs
13 years, 11 months ago (2011-09-18 20:42:23 UTC) #2
rsc
LGTM If this is not more expensive than MFENCE, sure. Otherwise, I'm not worried about ...
13 years, 11 months ago (2011-09-19 14:28:33 UTC) #3
dvyukov
They must be roughly the same. On my Core2 processor MFENCE-based version takes 24.1ns, while ...
13 years, 11 months ago (2011-09-19 17:59:51 UTC) #4
rsc
LGTM
13 years, 11 months ago (2011-09-19 18:02:33 UTC) #5
dvyukov
13 years, 11 months ago (2011-09-19 18:04:37 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=7a7ece494b67 ***

sync/atomic: replace MFENCE with LOCK XADD
MFENCE was introduced only on the Pentium4 (SSE2),
while XADD was introduced on the 486.
Fixes issue 2268.

R=golang-dev, rsc
CC=fshahriar, golang-dev
http://codereview.appspot.com/5056045
Sign in to reply to this message.

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