OSDN Git Service

mm: khugepaged: recalculate min_free_kbytes after stopping khugepaged
authorLiangcai Fan <liangcaifan19@gmail.com>
Fri, 5 Nov 2021 20:41:36 +0000 (13:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:39 +0000 (13:30 -0700)
commitbd3400ea173fb611cdf2030d03620185ff6c0b0e
tree06641ec051ba94a768253dcc282bb0531b665217
parent8531fc6f52f5fc201f43d8c36c2606e25748b1c4
mm: khugepaged: recalculate min_free_kbytes after stopping khugepaged

When initializing transparent huge pages, min_free_kbytes would be
calculated according to what khugepaged expected.

So when transparent huge pages get disabled, min_free_kbytes should be
recalculated instead of the higher value set by khugepaged.

Link: https://lkml.kernel.org/r/1633937809-16558-1-git-send-email-liangcaifan19@gmail.com
Signed-off-by: Liangcai Fan <liangcaifan19@gmail.com>
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h
mm/khugepaged.c
mm/page_alloc.c