mm, thp, migrate: handling migration of 64KB hugepages
authorSung-hun Kim <sfoon.kim@samsung.com>
Thu, 16 Sep 2021 04:44:25 +0000 (13:44 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 7 Feb 2022 08:01:41 +0000 (17:01 +0900)
commitdeb04f8a6609a1490554b3e22f3e1455778aafaa
treea00a461d215c3f80a5b6bd532476c7870e3ecbcc
parent4e119793c573094bb3db765cc96a1b85afa2f040
mm, thp, migrate: handling migration of 64KB hugepages

When a 64KB hugepage is migrated, it should be properly
handled since it is different from other normal page
mappings. The kernel should handle a set of sequential
16 page mappings at once. If not, the kernel can mishandle
map counts of a compound page (that is, a set of pages).
It can be a source of kernel bugs and the bug is easily
reproduced on low-memory devices.

This patch deals with the migration of 64KB hugepages.

Fixes: 90eb23660fef ('mm: THP: introducing a fine-grained transparent hugepage technique for ARM64 architecture')
Change-Id: I50a5d4e9a263e7dcbded15c982f57c15a3a48f39
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
arch/arm64/mm/huge_memory.c
include/linux/swapops.h
mm/migrate.c
mm/rmap.c