| From | "Kirill A. Shutemov" <> | Subject | RE: [PATCH 13/36] mm: drop tail page refcounting | Date | Tue, 14 Jul 2015 17:01:35 +0300 (EEST) |
| |
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) {
|