diff options
Diffstat (limited to 'Documentation/vm/unevictable-lru.txt')
-rw-r--r-- | Documentation/vm/unevictable-lru.txt | 8 |
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 | ||
468 | In addition the mlock()/mlockall() system calls, an application can request | 468 | In addition the mlock()/mlockall() system calls, an application can request |
469 | that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap() | 469 | that a region of memory be mlocked supplying the MAP_LOCKED flag to the mmap() |
470 | call. Furthermore, any mmap() call or brk() call that expands the heap by a | 470 | call. There is one important and subtle difference here, though. mmap() + mlock() |
471 | will fail if the range cannot be faulted in (e.g. because mm_populate fails) | ||
472 | and returns with ENOMEM while mmap(MAP_LOCKED) will not fail. The mmaped | ||
473 | area will still have properties of the locked area - aka. pages will not get | ||
474 | swapped out - but major page faults to fault memory in might still happen. | ||
475 | |||
476 | Furthermore, any mmap() call or brk() call that expands the heap by a | ||
471 | task that has previously called mlockall() with the MCL_FUTURE flag will result | 477 | task that has previously called mlockall() with the MCL_FUTURE flag will result |
472 | in the newly mapped memory being mlocked. Before the unevictable/mlock | 478 | in the newly mapped memory being mlocked. Before the unevictable/mlock |
473 | changes, the kernel simply called make_pages_present() to allocate pages and | 479 | changes, the kernel simply called make_pages_present() to allocate pages and |