You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
This issue is observed by reading the source code of the master branch.
While reading the code the other day I noticed that the p structure in src/runtime/runtime2.go includes the following at line 501:
pad [64]byte
I assume the intention is to pad by sys.CacheLineSize to avoid false sharing between the p structures. The value of 64 is currently plausible, but only because ppc64x is incorrectly configured with a cache line size of 64. (It should be 128; Someone from IBM will propose/confirm a fix - @laboger ?)
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
Insufficient padding in the p structure
runtime: insufficient padding in the p structure
Jul 23, 2016
Yes, the cache line size should be 128. The only ppc64 processors I'm aware of that have a 64 byte cache line size are the e5500 and the PA6T, which, I believe, aren't supported by Golang.
I'll work on this issue.
ceseo
added a commit
to ceseo/go
that referenced
this issue
Jul 29, 2016
The current padding in the 'p' struct is hardcoded at 64 bytes. This change
fixes that by making it equal to the cache line size. It also fixes the cache
line size for ppc64/ppc64le.
Fixesgolang#16477
The current padding in the 'p' struct is hardcoded at 64 bytes. It should be the
cache line size. On ppc64x, the current value is only okay because sys.CacheLineSize
is wrong at 64 bytes. This change fixes that by making the padding equal to the
cache line size. It also fixes the cache line size for ppc64/ppc64le to 128 bytes.
Fixesgolang#16477
Change-Id: Ib7ec5195685116eb11ba312a064f41920373d4a3
Reviewed-on: https://go-review.googlesource.com/25370
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Michael Munday <munday@ca.ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Please answer these questions before submitting your issue. Thanks!
go version
)?This issue is observed by reading the source code of the master branch.
While reading the code the other day I noticed that the
p
structure insrc/runtime/runtime2.go
includes the following at line 501:I assume the intention is to pad by
sys.CacheLineSize
to avoid false sharing between thep
structures. The value of 64 is currently plausible, but only becauseppc64x
is incorrectly configured with a cache line size of 64. (It should be 128; Someone from IBM will propose/confirm a fix - @laboger ?)The text was updated successfully, but these errors were encountered: