The description of MAP_LOCKED in mmap(2) is clear that it is best-effort and will not fail the call if it is unable to do the locking. It appears that MAP_POPULATE is similar (email at https://marc.info/?l=linux-mm&m=161528594100612&w=2), but this is not documented.
Hi Bruce, Would you mind sending a draft of the text (possibly a patch to <linux-man@vger.kernel.org>) that you think would fit MAP_POPULATE? Thanks, Alex
I can give it a go, although it should definitely be reviewed by someone who is familiar with the internals.