Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CachePadded aligns aarch64 to 64 instead of 128 #1139

Closed
wants to merge 1 commit into from

Conversation

xpepermint
Copy link

Ref: #1138

@taiki-e
Copy link
Member

taiki-e commented Sep 29, 2024

If we revert align of AArch64, we need to address the following comment explaining why we are currently using 128 in AArch64.

// ARM's big.LITTLE architecture has asymmetric cores and "big" cores have 128-byte cache line size.
//
// Sources:
// - https://www.mono-project.com/news/2016/09/12/arm64-icache/

@taiki-e
Copy link
Member

taiki-e commented Sep 29, 2024

Considering that the cache line size of the Apple M1 actually seems to be 128 bytes, your guess at #1138 regarding the problem you encountered is probably wrong and doing this does not seem right.

$ sysctl machdep.cpu.brand_string
machdep.cpu.brand_string: Apple M1 (Virtual)

$ sysctl hw.cachelinesize
hw.cachelinesize: 128
$ sysctl machdep.cpu.brand_string
machdep.cpu.brand_string: Apple M1 Pro

$ sysctl hw.cachelinesize
hw.cachelinesize: 128

@xpepermint xpepermint closed this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants