lmkd: Fix usage of ro.lmk.kill_heaviest_task property
lmkd should use ro.lmk.kill_heaviest_task property to select between algorithms for victim selection. Set ro.lmk.kill_heaviest_task default value to false in order to keep it compatible with previous versions of lmkd (killing the heaviest task is a new mechanism). Change-Id: I78d2dc79d9c54e636c26665605518d9c87b535b3 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
parent
d1d59f871f
commit
36b2c497e3
8
lmkd.c
8
lmkd.c
|
|
@ -788,10 +788,8 @@ static int find_and_kill_processes(enum vmpressure_level level,
|
||||||
struct proc *procp;
|
struct proc *procp;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (low_ram_device)
|
procp = kill_heaviest_task ?
|
||||||
procp = proc_adj_lru(i);
|
proc_get_heaviest(i) : proc_adj_lru(i);
|
||||||
else
|
|
||||||
procp = proc_get_heaviest(i);
|
|
||||||
|
|
||||||
if (!procp)
|
if (!procp)
|
||||||
break;
|
break;
|
||||||
|
|
@ -1202,7 +1200,7 @@ int main(int argc __unused, char **argv __unused) {
|
||||||
downgrade_pressure =
|
downgrade_pressure =
|
||||||
(int64_t)property_get_int32("ro.lmk.downgrade_pressure", 100);
|
(int64_t)property_get_int32("ro.lmk.downgrade_pressure", 100);
|
||||||
kill_heaviest_task =
|
kill_heaviest_task =
|
||||||
property_get_bool("ro.lmk.kill_heaviest_task", true);
|
property_get_bool("ro.lmk.kill_heaviest_task", false);
|
||||||
low_ram_device = property_get_bool("ro.config.low_ram", false);
|
low_ram_device = property_get_bool("ro.config.low_ram", false);
|
||||||
kill_timeout_ms =
|
kill_timeout_ms =
|
||||||
(unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0);
|
(unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue