gh-144438: Fix false sharing between QSBR and tlbc_index (gh-144554)
Align the QSBR thread state array to a 64-byte cache line boundary and add padding at the end of _PyThreadStateImpl. Depending on heap layout, the QSBR array could end up sharing a cache line with a thread's tlbc_index, causing QSBR quiescent state updates to contend with reads of tlbc_index in RESUME_CHECK. This is sensitive to earlier allocations during interpreter init and can appear or disappear with seemingly unrelated changes. Either change alone is sufficient to fix the specific issue, but both are worthwhile to avoid similar problems in the future.
S
Sam Gross committed
6577d870b0cb82baf540f4bcf49c01d68204e468
Parent: 1bd8cf9
Committed by GitHub <noreply@github.com>
on 2/17/2026, 4:12:25 PM