This interaction between mlockall and huge PROT_NONE mappings in the Linux kernel is a major annoyance:
lore.kernel.org/linux-mm/70885
Hope it turns out to be something that's easily fixable. It should be able to efficiently skip the entire mapping. It's unused, non-writable memory.
Conversation
Replying to
Linux kernel seems to think that it's a good idea to fault in all of the possible pages for PROT_NONE mappings. Trying to do that for many terabytes of pages doesn't work out well. Result is very strange. Need to make time to look into what the kernel actually ends up doing...
1
3
It seems like it might hit a very high value and then stops trying to fault in more pages. Ends up causing new memory mappings to fail if locking is still enabled. The munlockall call is even more strange. I'm not sure why this feature would do anything with PROT_NONE mappings...
1
1
2
