lkml.org 
[lkml]   [2015]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRE: [PATCH 13/36] mm: drop tail page refcounting
Date
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@linux.intel.com>
> Tested-by: Sasha Levin <sasha.levin@oracle.com>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>

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)
{

\
 
 \ /
  Last update: 2015-07-14 16:21    [W:0.189 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site