Skip to content

ENH: Ensure hugepages are also indicated for calloc allocations#27808

Merged
charris merged 1 commit intonumpy:mainfrom
seberg:issue-27483
Nov 21, 2024
Merged

ENH: Ensure hugepages are also indicated for calloc allocations#27808
charris merged 1 commit intonumpy:mainfrom
seberg:issue-27483

Conversation

@seberg
Copy link
Copy Markdown
Member

@seberg seberg commented Nov 21, 2024

On linux we madvise hugepages for large malloc allocations but fail to do so also for calloc allocations even though it makes just as much sense there.

This aligns the two (or rather three) code paths.

Closes gh-27483


I have run the test from the issue on a linux machine, and see a clear drop for the first write into the huge array (going down to be same as empty in this case, which I didn't even quite expect).

On linux we madvise hugepages for large malloc allocations but
fail to do so also for calloc allocations even though it makes
just as much sense there.

This aligns the two code paths.
@seberg seberg requested a review from mattip November 21, 2024 14:18
@charris charris merged commit 773a30b into numpy:main Nov 21, 2024
@charris
Copy link
Copy Markdown
Member

charris commented Nov 21, 2024

Thanks Sebastian.

@seberg seberg deleted the issue-27483 branch November 21, 2024 15:35
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.

BUG: numpy.zeros misses out on hugepages

2 participants