On 07/20/2015 04:20 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 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.shute...@linux.intel.com>
> Tested-by: Sasha Levin <sasha.le...@oracle.com>
> Tested-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com>
> Acked-by: Vlastimil Babka <vba...@suse.cz>

Acked-by: Jerome Marchand <jmarc...@redhat.com>

> ---
>  arch/mips/mm/gup.c            |   4 -
>  arch/powerpc/mm/hugetlbpage.c |  13 +-
>  arch/s390/mm/gup.c            |  13 +-
>  arch/sparc/mm/gup.c           |  14 +--
>  arch/x86/mm/gup.c             |   4 -
>  include/linux/mm.h            |  47 ++------
>  include/linux/mm_types.h      |  17 +--
>  mm/gup.c                      |  34 +-----
>  mm/huge_memory.c              |  41 +------
>  mm/hugetlb.c                  |   2 +-
>  mm/internal.h                 |  44 -------
>  mm/swap.c                     | 273 
> +++---------------------------------------
>  12 files changed, 40 insertions(+), 466 deletions(-)
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to