[[!template id=project title="Locking pages into memory, redux" contact=""" [tech-kern](mailto:tech-kern@NetBSD.org) """ category="kernel" difficulty="medium" duration="1-2 months" description=""" The mlock() system call locks pages in memory; however, it's meant for real-time applications that wish to avoid _pageins_. There's a second class of applications that want to lock pages in memory: databases and anything else doing journaling, logging, or ordered writes of any sort want to lock pages in memory to avoid _pageouts_. That is, it should be possible to lock a (dirty) page in memory so that it does not get written out until after it's unlocked. It is a bad idea to try to make mlock() serve this purpose as well as the purpose it already serves, so add a new call, perhaps mlockin(), and implement support in UVM. Then for extra credit ram it through POSIX and make Linux implement it :-) """ ]]