diff options
| author | Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> | 2016-07-29 14:02:26 -0300 |
|---|---|---|
| committer | Minux Ma <minux@golang.org> | 2016-08-29 23:22:51 +0000 |
| commit | aaa6b5352420aaaf9d46848facb5854927b3130e (patch) | |
| tree | 59b5924a61174735bf1a3786ff2bd6f46715b95a /src/runtime/runtime2.go | |
| parent | db1fef7b2afd12625e3edd90f879e5d05511d1d6 (diff) | |
| download | go-aaa6b5352420aaaf9d46848facb5854927b3130e.tar.xz | |
runtime: insufficient padding in the `p` structure
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.
Fixes #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>
Diffstat (limited to 'src/runtime/runtime2.go')
| -rw-r--r-- | src/runtime/runtime2.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/runtime2.go b/src/runtime/runtime2.go index 24f85d943d..2e886742b5 100644 --- a/src/runtime/runtime2.go +++ b/src/runtime/runtime2.go @@ -498,7 +498,7 @@ type p struct { runSafePointFn uint32 // if 1, run sched.safePointFn at next safe point - pad [64]byte + pad [sys.CacheLineSize]byte } const ( |
