Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f326985b authored by Suyog Sarda's avatar Suyog Sarda Committed by Vinayak Menon
Browse files

lowmemorykiller: Introduce sysfs node for ALMK and PPR adj threshold



The grouping of tasks based on oom_score_adj values change from
one framework to another. This requires corresponding changes in
the threshold values set for almk and per process reclaim.
Introduce sysfs nodes to set threshold adj for process reclaim
and adaptive LMK dynamically.

Change-Id: Ib7565bfd5d2e93aa4ff8fdd20414cac0a0f38bf7
Signed-off-by: default avatarSuyog Sarda <ssarda@codeaurora.org>
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent a60934ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ static unsigned long lowmem_count(struct shrinker *s,

static atomic_t shift_adj = ATOMIC_INIT(0);
static short adj_max_shift = 353;
module_param_named(adj_max_shift, adj_max_shift, short, 0644);

/* User knob to enable/disable adaptive lmk feature */
static int enable_adaptive_lmk;
+3 −1
Original line number Diff line number Diff line
@@ -46,6 +46,9 @@ static unsigned long pressure_max = 90;
module_param_named(pressure_min, pressure_min, ulong, 0644);
module_param_named(pressure_max, pressure_max, ulong, 0644);

static short min_score_adj = 360;
module_param_named(min_score_adj, min_score_adj, short, 0644);

/*
 * Scheduling process reclaim workqueue unecessarily
 * when the reclaim efficiency is low does not make
@@ -112,7 +115,6 @@ static void swap_fn(struct work_struct *work)
	int i;
	int tasksize;
	int total_sz = 0;
	short min_score_adj = 360;
	int total_scan = 0;
	int total_reclaimed = 0;
	int nr_to_reclaim;