]> git.baikalelectronics.ru Git - kernel.git/commit
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mon, 27 Nov 2017 03:21:25 +0000 (06:21 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Nov 2017 20:26:29 +0000 (12:26 -0800)
commitafa166c5321a2eeee3d7162e23c6646c136ab017
tree088b53c38a80b46fb6d46c49dc521dfa54e3a87b
parentfc34a8d7a6e80eb2c2304f3fb1526e012599ae42
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()

Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().

We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE.

The patch also changes touch_pud() in the same way.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c