mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
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: Suyog Sarda <ssarda@codeaurora.org> Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
parent
624dd2bd49
commit
b0c67828b5
2 changed files with 7 additions and 2 deletions
|
@ -86,6 +86,8 @@ static unsigned long lowmem_deathpending_timeout;
|
||||||
|
|
||||||
static atomic_t shift_adj = ATOMIC_INIT(0);
|
static atomic_t shift_adj = ATOMIC_INIT(0);
|
||||||
static short adj_max_shift = 353;
|
static short adj_max_shift = 353;
|
||||||
|
module_param_named(adj_max_shift, adj_max_shift, short,
|
||||||
|
S_IRUGO | S_IWUSR);
|
||||||
|
|
||||||
/* User knob to enable/disable adaptive lmk feature */
|
/* User knob to enable/disable adaptive lmk feature */
|
||||||
static int enable_adaptive_lmk;
|
static int enable_adaptive_lmk;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2 and
|
* it under the terms of the GNU General Public License version 2 and
|
||||||
|
@ -48,6 +48,10 @@ static unsigned long pressure_max = 90;
|
||||||
module_param_named(pressure_min, pressure_min, ulong, S_IRUGO | S_IWUSR);
|
module_param_named(pressure_min, pressure_min, ulong, S_IRUGO | S_IWUSR);
|
||||||
module_param_named(pressure_max, pressure_max, ulong, S_IRUGO | S_IWUSR);
|
module_param_named(pressure_max, pressure_max, ulong, S_IRUGO | S_IWUSR);
|
||||||
|
|
||||||
|
static short min_score_adj = 360;
|
||||||
|
module_param_named(min_score_adj, min_score_adj, short,
|
||||||
|
S_IRUGO | S_IWUSR);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Scheduling process reclaim workqueue unecessarily
|
* Scheduling process reclaim workqueue unecessarily
|
||||||
* when the reclaim efficiency is low does not make
|
* when the reclaim efficiency is low does not make
|
||||||
|
@ -114,7 +118,6 @@ static void swap_fn(struct work_struct *work)
|
||||||
int i;
|
int i;
|
||||||
int tasksize;
|
int tasksize;
|
||||||
int total_sz = 0;
|
int total_sz = 0;
|
||||||
short min_score_adj = 360;
|
|
||||||
int total_scan = 0;
|
int total_scan = 0;
|
||||||
int total_reclaimed = 0;
|
int total_reclaimed = 0;
|
||||||
int nr_to_reclaim;
|
int nr_to_reclaim;
|
||||||
|
|
Loading…
Reference in a new issue