Skip to content

Fix threadsPerCore check for Zen 2 (AMD)#149

Merged
klauspost merged 1 commit intoklauspost:masterfrom
maksimio:feat/correct-amd-zen2-htt-detection
Oct 26, 2024
Merged

Fix threadsPerCore check for Zen 2 (AMD)#149
klauspost merged 1 commit intoklauspost:masterfrom
maksimio:feat/correct-amd-zen2-htt-detection

Conversation

@maksimio
Copy link
Copy Markdown
Contributor

@maksimio maksimio commented Oct 26, 2024

Hello @klauspost, thanks for the library! I tried running it on my CPU Ryzen 5 4500u (Zen2) and found that the number of threads per core (2) and physical cores (3) were incorrect and the HTT option was also detected incorrectly. In fact this cpu has 1 thread per core and 6 physical (and logical) cores

I wrote a fix using the PPR for AMD Family 17h Models 00h-0Fh Processors (page 82)

изображение

You can find CPUID dump of Ryzen 5 4500u here

Copy link
Copy Markdown
Owner

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find! While unlikely to ever be hit, I'd propose this as a conservative approach.

Something VM's can be a bit finicky and filter CPUID values.

@maksimio maksimio requested a review from klauspost October 26, 2024 19:58
@klauspost klauspost merged commit ee7cba9 into klauspost:master Oct 26, 2024
@maksimio maksimio deleted the feat/correct-amd-zen2-htt-detection branch October 26, 2024 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants