mirror of
https://github.com/golang/go
synced 2024-11-23 14:00:03 -07:00
internal/cpu: fix cpu cacheLineSize for loong64
We choose 64 because the L1 Dcache of Loongson 3A5000 CPU is 4-way 256-line 64-byte-per-line. Change-Id: Ifb9a9f993dd6f75b5adb4ff6e4d93e945b1b2a98 Reviewed-on: https://go-review.googlesource.com/c/go/+/408854 Run-TryBot: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Alex Rakoczy <alex@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
f8c26a59a4
commit
ec9258029e
@ -6,6 +6,8 @@
|
||||
|
||||
package cpu
|
||||
|
||||
const CacheLinePadSize = 32
|
||||
// CacheLinePadSize is used to prevent false sharing of cache lines.
|
||||
// We choose 64 because Loongson 3A5000 the L1 Dcache is 4-way 256-line 64-byte-per-line.
|
||||
const CacheLinePadSize = 64
|
||||
|
||||
func doinit() {}
|
||||
|
Loading…
Reference in New Issue
Block a user