thp, khugepaged: skip retracting page table if a 64KB hugepage mapping is already... 81/265081/3
authorSung-hun Kim <sfoon.kim@samsung.com>
Wed, 6 Oct 2021 04:33:00 +0000 (13:33 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Tue, 12 Oct 2021 05:34:49 +0000 (14:34 +0900)
commit91192eaf1633c6b6a6cada09007b4e788fdb3550
tree64fc23fe2e738ca8b9412d4ae8e5deba8ff23f0e
parent44021aaaef7f4e80d3ce5886bac8c8ac378aee93
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