From 58078df520f2fcfc4b7aa3b9316719022dd0b4e0 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Tue, 26 Mar 2019 22:34:21 -0700 Subject: [PATCH] mm: Boost when memory pressure becomes high When memory pressure starts to balloon, allocation latency takes a hit as the page allocator continuously tries to find a way to free up some pages. Boosting when this occurs can significantly help reduce allocation latency, preventing noticeable lag from being observed. Signed-off-by: Sultan Alsawaf Signed-off-by: Yaroslav Furman Signed-off-by: PrimoDev23 Signed-off-by: Sudeep Duhoon --- mm/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 9308bf0e8e2e..0d7b75d7b151 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -69,6 +69,8 @@ #include #include #include +#include +#include #include #include @@ -4160,6 +4162,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, /* Boost when memory is low so allocation latency doesn't get too bad */ devfreq_boost_kick_max(DEVFREQ_MSM_LLCCBW, 100); + cpu_input_boost_kick_max(100); devfreq_boost_kick_max(DEVFREQ_MSM_CPUBW, 100); if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,