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

Huge page size support in mmap / sys::mman #1194

Closed
GuillaumeDIDIER opened this issue Mar 17, 2020 · 5 comments
Closed

Huge page size support in mmap / sys::mman #1194

GuillaumeDIDIER opened this issue Mar 17, 2020 · 5 comments

Comments

@GuillaumeDIDIER
Copy link
Contributor

GuillaumeDIDIER commented Mar 17, 2020

Since linux 3.8 there are additional flags to mmap (and possibly madvise not madvise) that allow specifying what size of huge page should be used.

http://man7.org/linux/man-pages/man2/mmap.2.html

How could support for those be added to nix ?

@asomers
Copy link
Member

asomers commented Mar 17, 2020

First you'll need to add the new symbols to libc, and make a PR to github.com/rust-lang/libc . Then you can add them to Nix.

@GuillaumeDIDIER
Copy link
Contributor Author

That mean I probably need to open an issue at libc (or unsolicited PR right away) ?

@GuillaumeDIDIER
Copy link
Contributor Author

The PR got merged at libc. How do I proceed now, should I override the libc version to start working on a PR (and update that back when the next release gets out) ? Or should I wait for the next libc release ?

@asomers
Copy link
Member

asomers commented Apr 11, 2020

Yes. You can set Nix's libc version to use a git hash for now.

@GuillaumeDIDIER
Copy link
Contributor Author

Hmm, I need to add a bunch of flags to mmap, but this is an exclusive set of values on several flag bits. (That also only make sense if another flag is set). Is this something where I should declare a third type and add an extra parameter to mmap, or can this be simply added in the bit flag without causing a mess ?

GuillaumeDIDIER added a commit to GuillaumeDIDIER/nix that referenced this issue Apr 20, 2020
bors bot added a commit that referenced this issue Apr 22, 2020
1211: Feature/hugepage size r=asomers a=GuillaumeDIDIER

Should solve #1194 .

Co-authored-by: GuillaumeDIDIER <guillaume.didier95@hotmail.fr>
@bors bors bot closed this as completed in d7a725d Apr 22, 2020
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

No branches or pull requests

2 participants