summaryrefslogtreecommitdiffstats
path: root/mm/rmap.c
diff options
context:
space:
mode:
authorNaoya Horiguchi2016-01-16 01:54:07 +0100
committerLinus Torvalds2016-01-16 02:56:32 +0100
commit4e41a30c6d506c884d3da9aeb316352e70679d4b (patch)
treec3761eb80cd46078a38c14471d1216dcb859122c /mm/rmap.c
parentmm: soft-offline: check return value in second __get_any_page() call (diff)
downloadkernel-qcow2-linux-4e41a30c6d506c884d3da9aeb316352e70679d4b.tar.gz
kernel-qcow2-linux-4e41a30c6d506c884d3da9aeb316352e70679d4b.tar.xz
kernel-qcow2-linux-4e41a30c6d506c884d3da9aeb316352e70679d4b.zip
mm: hwpoison: adjust for new thp refcounting
Some mm-related BUG_ON()s could trigger from hwpoison code due to recent changes in thp refcounting rule. This patch fixes them up. In the new refcounting, we no longer use tail->_mapcount to keep tail's refcount, and thereby we can simplify get/put_hwpoison_page(). And another change is that tail's refcount is not transferred to the raw page during thp split (more precisely, in new rule we don't take refcount on tail page any more.) So when we need thp split, we have to transfer the refcount properly to the 4kB soft-offlined page before migration. thp split code goes into core code only when precheck (total_mapcount(head) == page_count(head) - 1) passes to avoid useless split, where we assume that one refcount is held by the caller of thp split and the others are taken via mapping. To meet this assumption, this patch moves thp split part in soft_offline_page() after get_any_page(). [akpm@linux-foundation.org: remove unneeded #define, per Kirill] Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/rmap.c')
0 files changed, 0 insertions, 0 deletions