问题
There have been some discussions to use a new flag in madvise() to tell the kernel not to handle page faults in certain memory ranges: lwn.net-1, lwn.net-2
As far as I am able to see, this flag hasn't found its way to the kernel source.
What's the current status of this work?
回答1:
The community never went forward with MADV_USERFAULT. Instead, a more robust solution called userfaultfd has made its way into the kernel. https://www.kernel.org/doc/Documentation/vm/userfaultfd.txt
来源:https://stackoverflow.com/questions/37290713/whats-the-status-of-the-madv-userfault-flag-in-madvise