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 <sultan@kerneltoast.com> Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
This commit is contained in:
committed by
UtsavBalar1231
parent
574fbb390d
commit
bf459bce2c
@@ -69,6 +69,8 @@
|
||||
#include <linux/lockdep.h>
|
||||
#include <linux/nmi.h>
|
||||
#include <linux/psi.h>
|
||||
#include <linux/cpu_input_boost.h>
|
||||
#include <linux/devfreq_boost.h>
|
||||
|
||||
#include <asm/sections.h>
|
||||
#include <asm/tlbflush.h>
|
||||
@@ -4213,6 +4215,10 @@ retry:
|
||||
if (costly_order && !(gfp_mask & __GFP_RETRY_MAYFAIL))
|
||||
goto nopage;
|
||||
|
||||
/* Boost when memory is low so allocation latency doesn't get too bad */
|
||||
cpu_input_boost_kick_max(100);
|
||||
devfreq_boost_kick_max(DEVFREQ_MSM_CPUBW, 100);
|
||||
|
||||
if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
|
||||
did_some_progress > 0, &no_progress_loops))
|
||||
goto retry;
|
||||
|
||||
Reference in New Issue
Block a user