linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thp, mlock: update unevictable-lru.txt
@ 2016-03-15 14:55 Kirill A. Shutemov
  2016-03-15 15:30 ` Dave Hansen
  0 siblings, 1 reply; 4+ messages in thread
From: Kirill A. Shutemov @ 2016-03-15 14:55 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, Kirill A. Shutemov

Add description of THP handling into unevictable-lru.txt.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
---
 Documentation/vm/unevictable-lru.txt | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/vm/unevictable-lru.txt b/Documentation/vm/unevictable-lru.txt
index fa3b527086fa..c47566fc49cb 100644
--- a/Documentation/vm/unevictable-lru.txt
+++ b/Documentation/vm/unevictable-lru.txt
@@ -461,6 +461,25 @@ unevictable LRU is enabled, the work of compaction is mostly handled by
 the page migration code and the same work flow as described in MIGRATING
 MLOCKED PAGES will apply.
 
+MLOCKING TRANSPARENT HUGE PAGES
+-------------------------------
+
+Transparent huge page is represented by single entry on a lru list and
+therefore we can only make unevictable entire compound page, not
+individual subpages.
+
+We allow a part of transparent huge page to be mapped PTEs (i.e. after
+mremap() or mprotect()) and VMA with PTE-mapped huge page can be mlocked.
+
+That means we need to be careful, not making entire huge page unevicable
+if user mlock() only part of it.
+
+We handle this by forbidding mlocking PTE-mapped huge pages. This way we
+keep the huge page accessible for vmscan. Under memory pressure the page
+will be split, subpages from VM_LOCKED VMAs moved to unevictable lru and
+the rest can be evicted.
+
+See also comment in follow_trans_huge_pmd().
 
 mmap(MAP_LOCKED) SYSTEM CALL HANDLING
 -------------------------------------
-- 
2.7.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-15 16:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15 14:55 [PATCH] thp, mlock: update unevictable-lru.txt Kirill A. Shutemov
2016-03-15 15:30 ` Dave Hansen
2016-03-15 15:42   ` Kirill A. Shutemov
2016-03-15 16:56     ` Kirill A. Shutemov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).