]> Git Repo - linux.git/commit - mm/mlock.c
mm: introduce mm_populate() for populating new vmas
authorMichel Lespinasse <[email protected]>
Sat, 23 Feb 2013 00:32:37 +0000 (16:32 -0800)
committerLinus Torvalds <[email protected]>
Sun, 24 Feb 2013 01:50:10 +0000 (17:50 -0800)
commitbebeb3d68b24bb4132d452c5707fe321208bcbcd
tree6e609cb7323fb1b4b7026fa0e35867145a181094
parent940e7da5163029978c2f6b5bbe213607add59062
mm: introduce mm_populate() for populating new vmas

When creating new mappings using the MAP_POPULATE / MAP_LOCKED flags (or
with MCL_FUTURE in effect), we want to populate the pages within the
newly created vmas.  This may take a while as we may have to read pages
from disk, so ideally we want to do this outside of the write-locked
mmap_sem region.

This change introduces mm_populate(), which is used to defer populating
such mappings until after the mmap_sem write lock has been released.
This is implemented as a generalization of the former do_mlock_pages(),
which accomplished the same task but was using during mlock() /
mlockall().

Signed-off-by: Michel Lespinasse <[email protected]>
Reported-by: Andy Lutomirski <[email protected]>
Acked-by: Rik van Riel <[email protected]>
Tested-by: Andy Lutomirski <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/aio.c
include/linux/mm.h
ipc/shm.c
mm/mlock.c
mm/mmap.c
mm/nommu.c
mm/util.c
This page took 0.061086 seconds and 4 git commands to generate.