1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:34:40 -07:00

Add padding to fix HITM issue across CPU sockets. Fix #47831.

This commit is contained in:
Heyuan Liu 2021-09-08 14:35:07 +08:00
parent d08c3987b6
commit 53b846c7f1

View File

@ -134,8 +134,8 @@ type mheap struct {
// This is accessed atomically.
reclaimCredit uintptr
//add 64 bytes padding to seperate the data into different cacheline to fix HITM issue across CPU sockets
_ [8]uint64
// Add padding to separate the data into different cacheline to fix HITM issue across CPU sockets.
_ cpu.CacheLinePad
// arenas is the heap arena map. It points to the metadata for
// the heap for every arena frame of the entire usable virtual