summaryrefslogtreecommitdiffstats
path: root/Documentation/vm/unevictable-lru.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/vm/unevictable-lru.txt')
-rw-r--r--Documentation/vm/unevictable-lru.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index 3be0bfc4738d..32ee3a67dba2 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -467,7 +467,13 @@ mmap(MAP_LOCKED) SYSTEM CALL HANDLING
467 467
468In addition the mlock()/mlockall() system calls, an application can request 468In addition the mlock()/mlockall() system calls, an application can request
469that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap() 469that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap()
470call. Furthermore, any mmap() call or brk() call that expands the heap by a 470call. There is one important and subtle difference here, though. mmap() + mlock()
471will fail if the range cannot be faulted in (e.g. because mm_populate fails)
472and returns with ENOMEM while mmap(MAP_LOCKED) will not fail. The mmaped
473area will still have properties of the locked area - aka. pages will not get
474swapped out - but major page faults to fault memory in might still happen.
475
476Furthermore, any mmap() call or brk() call that expands the heap by a
471task that has previously called mlockall() with the MCL_FUTURE flag will result 477task that has previously called mlockall() with the MCL_FUTURE flag will result
472in the newly mapped memory being mlocked. Before the unevictable/mlock 478in the newly mapped memory being mlocked. Before the unevictable/mlock
473changes, the kernel simply called make_pages_present() to allocate pages and 479changes, the kernel simply called make_pages_present() to allocate pages and