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
Use MADV_FREE on linux kernel >= 4.5 #387
Comments
Last I tested MADV_FREE doesn't work correctly on swapless systems yet (changes still in review -https://lkml.org/lkml/2015/11/24/753). So probably can't be be the default yet and needs to be an option |
It looks like the current state of affairs is that |
Add feature tests for the MADV_FREE and MADV_DONTNEED flags to madvise(2), so that MADV_FREE is detected and used for Linux kernel versions 4.5 and newer. Refactor pages_purge() so that on systems which support both flags, MADV_FREE is preferred over MADV_DONTNEED. This resolves #387.
Maybe it's just me but I'm leery of configure-time checks for things like this. What happens if I build this on a system where it's available but then run it on a system where it isn't? Maybe this is a spurious concern. |
Yeah, cross compiling of any form is in general a dangerous business, and this particular configuration test is a bit more fragile than most because we tend to think of systems with merely different kernel versions as equivalent targets. That said, I want to support |
@jasone @djwatson This is no longer the case, see https://www.spinics.net/lists/linux-mm/msg167333.html
|
Maybe a new configure option to enable/disable this at compile time for linux?
The text was updated successfully, but these errors were encountered: