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

ENH: Enable huge pages in all Linux builds #14309

Merged
merged 3 commits into from Aug 21, 2019

Conversation

charris
Copy link
Member

@charris charris commented Aug 20, 2019

Backport of #14216.

This PR modifies memory allocation in such a way that huge pages for large arrays is enabled in all Linux builds (even if MADV_HUGEPAGE is not defined). As per discussion in #14177, this isn't the case currently, which means huge pages may never be available depending on the NumPy build, even if the runtime system supports it. Both conda-forge and pip builds for 1.17.0 seem to not include support for huge pages.

The madvise() man-pages indicates that it will return EINVAL if the advice is invalid. At runtime, that means that it will be enabled if available, otherwise for the use case in NumPy it's enough to simply ignore the error to fallback to default behavior.

Fixes #14177 .

@charris
Copy link
Member Author

charris commented Aug 20, 2019

I put WIP on this so that we can check if the fix works in master before backporting.

@charris charris changed the title WIP, ENH: Enable huge pages in all Linux builds ENH: Enable huge pages in all Linux builds Aug 21, 2019
@charris charris removed the 25 - WIP label Aug 21, 2019
@charris charris merged commit e105449 into numpy:maintenance/1.17.x Aug 21, 2019
@charris charris deleted the backport-14216 branch August 21, 2019 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants