mlock() and mlockall() only guarantee that pages won't be swapped out to
the disk. However, they don't prevent virtual pages from moving to other
physical pages (for instance during migration between NUMA nodes), which
breaks memory registration. At least this was true a couple years ago, I
Thanks Jeff and Alex for your answers and comments.
mlockall(), especially with the MCL_FUTURE argument is indeed interesting.
Thanks Jeff for your clarification of what memory registration really means
(e.g. locking and telling the network stack the virtual to physical mapping).