[PATCH] D71975: [Support] Support MF_HUGE_HINT on Linux and FreeBSD
John Baldwin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 17:16:51 PST 2020
bsdjhb added a comment.
For FreeBSD, `MAP_ALIGNED_SUPER` probably isn't what you want. The default mmap() for MAP_ANON on FreeBSD tries to do what `MAP_ALIGNED_SUPER` does if the request is at least one large page in size first, and if that fails to find available address space, falls back to finding any possible virtual addresses (it does the two steps you are doing inside of mmap() itself). Specifying `MAP_ALIGNED_SUPER` tells mmap() to only try the first pass and fail without trying the second pass, but then the second call to mmap() that you would make as a result would just do both passes anyway.
FreeBSD doesn't currently have a "must-only-use-large-pages-and-never-demote-to-small-pages" flag which is probably what you would want to use here instead. (We've talked about adding one, but no one has done it to date.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71975/new/
https://reviews.llvm.org/D71975
More information about the llvm-commits
mailing list