RE: [PATCH 13/36] mm: drop tail page refcounting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kirill A. Shutemov wrote:
> Tail page refcounting is utterly complicated and painful to support.
> 
> It uses ->_mapcount on tail pages to store how many times this page is
> pinned. get_page() bumps ->_mapcount on tail page in addition to
> ->_count on head. This information is required by split_huge_page() to
> be able to distribute pins from head of compound page to tails during
> the split.
> 
> We will need ->_mapcount to account PTE mappings of subpages of the
> compound page. We eliminate need in current meaning of ->_mapcount in
> tail pages by forbidding split entirely if the page is pinned.
> 
> The only user of tail page refcounting is THP which is marked BROKEN for
> now.
> 
> Let's drop all this mess. It makes get_page() and put_page() much
> simpler.
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Tested-by: Sasha Levin <sasha.levin@xxxxxxxxxx>
> Acked-by: Vlastimil Babka <vbabka@xxxxxxx>

checkpatch fixlet:

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 57fcb78a3cef..681997bccc52 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -493,7 +493,7 @@ static inline void init_page_count(struct page *page)
 	atomic_set(&page->_count, 1);
 }
 
-void __put_page(struct page* page);
+void __put_page(struct page *page);
 
 static inline void put_page(struct page *page)
 {

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]