Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Commit

Permalink
mm: Boost when memory pressure becomes high
Browse files Browse the repository at this point in the history
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: PrimoDev23 <lexx.ps2711@gmail.com>
Signed-off-by: Sudeep Duhoon <rishi.gothic@gmail.com>
  • Loading branch information
kerneltoast authored and zennnez committed Jun 12, 2020
1 parent 25b012f commit 58078df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 58078df

Please sign in to comment.