thp, khugepaged: skip retracting page table if a 64KB hugepage mapping is already...
authorSung-hun Kim <sfoon.kim@samsung.com>
Wed, 6 Oct 2021 04:33:00 +0000 (13:33 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 7 Feb 2022 08:01:41 +0000 (17:01 +0900)
commit7149eed7f9377a7cd1ebc66da2c61885cee1e683
treeee1aa728aed93493a948a3c5ec1f054410b6e83c
parent5338d6493b4bfa6af640794f45c4247fe7a18a50
thp, khugepaged: skip retracting page table if a 64KB hugepage mapping is already established

When khugepaged tries to retract page table entries,
an user can try to handle a page fault. To prevent
concurrent modifications for an address space, an
mmap_lock is used.

If khugepaged failed to get lock, it delays page
table retraction to the next interation. Previously,
however, khugepaged assumes that page table entries
have normal mapping, especially for 64KB hugepages.

This patch checks that a mapping is already
established for 64KB hugepage appropriately. If it is
khugepaged just skips a retraction.

Change-Id: I961e21e65e2ae09df43488582d1469e250059909
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
mm/khugepaged.c