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

Fixes for max CPU count of 64 #347

Merged
merged 4 commits into from
Aug 4, 2024
Merged

Fixes for max CPU count of 64 #347

merged 4 commits into from
Aug 4, 2024

Conversation

deplinenoise
Copy link
Owner

Change static arrays to dynamically allocated arrays. I think we can afford two allocations per run of the tool.

The root cause was a bug where a copy of the configuration was taken before the clamp was applied.

However I'm still not sure why some Linux distributions lie and pretend to have 128 CPUs.

Fixes #346

Some Linux kernels are configured to allow "CPU hotswap" which means
they pretend to have some huge array (128) of CPUs that might come
online. This is weird. If we ask for the number of online CPUs that
should be a saner value.

std::thread::concurrency has the same issue, I think it uses the total
count, which seems like a pretty bad bug in itself but outside the scope
of this project.
@deplinenoise deplinenoise merged commit 3bb6133 into master Aug 4, 2024
3 checks passed
@deplinenoise deplinenoise deleted the fixes branch August 4, 2024 17:05
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.

crash with too many threads
1 participant