kernel-ark/arch/s390/mm
Kirill A. Shutemov ddc58f27f9 mm: drop tail page refcounting
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>
Tested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Steve Capper <steve.capper@linaro.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-01-15 17:56:32 -08:00
..
cmm.c s390: convert use of typedef ctl_table to struct ctl_table 2013-10-28 08:36:25 +01:00
dump_pagetables.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
extable.c s390: fix normalization bug in exception table sorting 2016-01-11 13:02:28 +01:00
extmem.c s390/extmem: remove unused variable 2015-12-18 14:59:29 +01:00
fault.c s390/fault: remove unused variable 2015-12-18 14:59:28 +01:00
gup.c mm: drop tail page refcounting 2016-01-15 17:56:32 -08:00
hugetlbpage.c s390/mm: implement soft-dirty bits for user memory change tracking 2015-10-14 14:32:05 +02:00
init.c s390: avoid cache aliasing under z/VM and KVM 2015-11-16 12:04:18 +01:00
maccess.c s390: rename struct _lowcore to struct lowcore 2016-01-11 12:27:15 +01:00
Makefile s390/mem_detect: move memory detection code to mm folder 2013-05-02 15:50:22 +02:00
mem_detect.c s390/mem_detect: use unsigned longs 2016-01-11 12:27:11 +01:00
mmap.c s390: avoid cache aliasing under z/VM and KVM 2015-11-16 12:04:18 +01:00
page-states.c s390/cmma: remove "cmma disable" code in case of dump again 2014-05-20 08:58:42 +02:00
pageattr.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00
pgtable.c mm, shmem: add internal shmem resident memory accounting 2016-01-14 16:00:49 -08:00
vmem.c s390: remove 31 bit support 2015-03-25 11:49:33 +01:00