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 <[email protected]>
> Tested-by: Sasha Levin <[email protected]>
> Acked-by: Vlastimil Babka <[email protected]>
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/