Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: Enable huge pages in all Linux builds#14322

Merged
charris merged 3 commits into
numpy:maintenance/1.16.xfrom
charris:backport-14216
Aug 22, 2019
Merged

ENH: Enable huge pages in all Linux builds#14322
charris merged 3 commits into
numpy:maintenance/1.16.xfrom
charris:backport-14216

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Aug 21, 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 charris added this to the 1.16.5 release milestone Aug 21, 2019
@charris charris merged commit 2ec0f27 into numpy:maintenance/1.16.x Aug 22, 2019
@charris charris deleted the backport-14216 branch August 22, 2019 00:45
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.

2 participants