Commit e19d818d authored by Sultan Alsawaf's avatar Sultan Alsawaf Committed by arnavpuranik
Browse files

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: default avatarSultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: ronax's avatarronaxdevil <pratabidya.007@gmail.com>
Signed-off-by: arnavpuranik's avatararnavpuranik <puranikarnav@gmail.com>
parent 3718f7c5
......@@ -62,6 +62,7 @@
#include <linux/sched/rt.h>
#include <linux/page_owner.h>
#include <linux/kthread.h>
#include <linux/devfreq_boost.h>
#include <asm/sections.h>
#include <asm/tlbflush.h>
......@@ -3291,6 +3292,9 @@ retry:
if (gfp_mask & __GFP_NORETRY)
goto noretry;
/* Boost when memory is low so allocation latency doesn't get too bad */
devfreq_boost_kick_max(DEVFREQ_MSM_CPUBW, 100);
/* Keep reclaiming pages as long as there is reasonable progress */
pages_reclaimed += did_some_progress;
if ((did_some_progress && order <= PAGE_ALLOC_COSTLY_ORDER) ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment