File:  [NetBSD Developer Wiki] / wikisrc / projects / project / mlockin.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Mon Feb 16 06:27:40 2015 UTC (6 years, 11 months ago) by dholland
Branches: MAIN
CVS tags: HEAD
Add a project for an mlock() that can be used by databases for their

[[!template id=project

title="Locking pages into memory, redux"


duration="1-2 months"

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
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 :-)

CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb