filemap: add comment for confusing logic in page_cache_tree_insert()
Subsystems (2)
PATCH 1/1 filemap: add comment for confusing logic in page_cache_tree_insert()
Unlike THP, hugetlb pages represented by one entry on radix-tree.
Signed-off-by Kirill A. Shutemov <[email protected]>
Cc Jan Kara <[email protected]>
--- mm/filemap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
mm/filemap.c +4 -1
@@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct address_space *mapping,static void page_cache_tree_delete (struct address_space *mapping,struct page *page,void *shadow) { -int i, nr =PageHuge (page) ?1 :hpage_nr_pages (page); +int i, nr; + +/* hugetlb pages represented by one entry on radix-tree */ + nr =PageHuge (page) ?1 :hpage_nr_pages (page);VM_BUG_ON_PAGE (!PageLocked (page), page);VM_BUG_ON_PAGE (PageTail (page), page);
Signature · 7 lines
2.9.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Jan Kara
maintainerQuoted 4 lines · Kirill A. Shutemov
Unlike THP, hugetlb pages represented by one entry on radix-tree.
Signed-off-by Kirill A. Shutemov <[email protected]>Cc Jan Kara <[email protected]>
Thanks!
Honza
Quoted 23 lines
--- mm/filemap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)mm/filemap.c +4
-1@@ -169,7 +169,10 @@ static int page_cache_tree_insert(struct address_space *mapping,static void page_cache_tree_delete (struct address_space *mapping,struct page *page,void *shadow) { -int i, nr =PageHuge (page) ?1 :hpage_nr_pages (page); +int i, nr; + +/* hugetlb pages represented by one entry on radix-tree */ + nr =PageHuge (page) ?1 :hpage_nr_pages (page);VM_BUG_ON_PAGE (!PageLocked (page), page);VM_BUG_ON_PAGE (PageTail (page), page);Signature · 1 line
2.9.3
Signature · 8 lines
Jan Kara <[email protected]> SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Kirill A. Shutemov
Unlike THP, hugetlb pages represented by one entry on radix-tree.
Signed-off-by Kirill A. Shutemov <[email protected]>Cc Jan Kara <[email protected]>
Acked-by Johannes Weiner <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>