mm: Stop kswapd early when nothing's waiting for it to free pages
Keeping kswapd running when all the failed allocations that invoked it are satisfied incurs a high overhead due to unnecessary page eviction and writeback, as well as spurious VM pressure events to various registered shrinkers. When kswapd doesn't need to work to make an allocation succeed anymore, stop it prematurely to save resources. Signed-off-by:Sultan Alsawaf <sultan@kerneltoast.com> [kdrag0n: Forward-ported from 4.14 to 4.19] Signed-off-by:
Danny Lin <danny@kdrag0n.dev>
Loading
Please register or sign in to comment