mm, thp: preventing hugepage creation for read-write file pages 82/265082/3 accepted/tizen/6.5/unified/20211103.015137 accepted/tizen/unified/20211028.122206 submit/tizen/20211013.042847 submit/tizen/20211027.044930 submit/tizen_6.5/20211027.044719 submit/tizen_6.5/20211101.045952
authorSung-hun Kim <sfoon.kim@samsung.com>
Thu, 7 Oct 2021 07:57:39 +0000 (16:57 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Tue, 12 Oct 2021 05:34:58 +0000 (14:34 +0900)
commitbca41ebfc598858807071491cdb85f61773d8a77
tree67f03f056c6ac5bfa63dcf02ac2e445d7f948a11
parent91192eaf1633c6b6a6cada09007b4e788fdb3550
mm, thp: preventing hugepage creation for read-write file pages

Sometimes, an user process incurs writes on file pages
which has VM_DENYWRITE flag in its vma->vm_flags (of
course, the vma has VM_WRITE flags too). In this case,
the kernel creates a new page by a COW fault, but it is
an unexpected behaviour for 64KB file hugepages.

This patch disallows scanning of read-write file pages
to prevent unexpected buggy behaviours.

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