Re: [PATCHv6 13/36] mm: drop tail page refcounting

Vlastimil Babka
2015-06-09T13:59:51Z

On 06/03/2015 07:05 PM, 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 acoount PTE mappings of subpages of the

to account

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