mm, thp, migrate: handling migration of 64KB hugepages 84/264384/2 accepted/tizen/6.5/unified/20211028.115906 accepted/tizen/unified/20210917.124840 submit/tizen/20210917.055514 submit/tizen_6.5/20211028.163201 tizen_6.5.m2_release
authorSung-hun Kim <sfoon.kim@samsung.com>
Thu, 16 Sep 2021 04:44:25 +0000 (13:44 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Fri, 17 Sep 2021 00:54:57 +0000 (09:54 +0900)
commit78df7c9b0b1662288349db6cd2de55d76e56929a
tree076922e27647fb155547c0312284dee673ab1925
parentbe97c7c0fb8de0bc2dfc7bf82bf02bcc11142ae0
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: 7d5372737d34 ('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