]> git.baikalelectronics.ru Git - kernel.git/commit
mm: thp: don't need to drain lru cache when splitting and mlocking THP
authorYang Shi <yang.shi@linux.alibaba.com>
Wed, 3 Jun 2020 23:03:37 +0000 (16:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jun 2020 03:09:49 +0000 (20:09 -0700)
commit84e0ff7bbdc01314342a292852e0eece65916a04
tree2cc80a3f7a0a59b7d27eb50a53d5139722077b46
parent7ca0ec41514ae6b5821f928372fe929dd6bc9ea7
mm: thp: don't need to drain lru cache when splitting and mlocking THP

Since commit 3f7a6dd99526 ("mm/swap.c: flush lru pvecs on compound page
arrival") THP would not stay in pagevec anymore.  So the optimization made
by commit 467e103ef178 ("thp: increase split_huge_page() success rate")
doesn't make sense anymore, which tries to unpin munlocked THPs from
pagevec by draining pagevec.

Draining lru cache before isolating THP in mlock path is also unnecessary.
d09dedda6f13 ("mm, thp: fix mapped pages avoiding unevictable list on
mlock") added it and 97bfeea9c9fa ("thp, mlock: do not mlock PTE-mapped
file huge pages") accidentally carried it over after the above
optimization went in.

Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Link: http://lkml.kernel.org/r/1585946493-7531-1-git-send-email-yang.shi@linux.alibaba.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/huge_memory.c