Merge changes I78d2dc79,I6e2eaebe am: bb266150fe am: 4d41a1f882
am: 6607770968 Change-Id: I22db50c6e56549582dd8c8dfcda9794d3989a17c
This commit is contained in:
commit
fc2123fdcf
14
lmkd.c
14
lmkd.c
|
|
@ -117,7 +117,7 @@ static bool debug_process_killing;
|
||||||
static bool enable_pressure_upgrade;
|
static bool enable_pressure_upgrade;
|
||||||
static int64_t upgrade_pressure;
|
static int64_t upgrade_pressure;
|
||||||
static int64_t downgrade_pressure;
|
static int64_t downgrade_pressure;
|
||||||
static bool is_go_device;
|
static bool low_ram_device;
|
||||||
static bool kill_heaviest_task;
|
static bool kill_heaviest_task;
|
||||||
static unsigned long kill_timeout_ms;
|
static unsigned long kill_timeout_ms;
|
||||||
|
|
||||||
|
|
@ -801,10 +801,8 @@ static int find_and_kill_processes(enum vmpressure_level level,
|
||||||
struct proc *procp;
|
struct proc *procp;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (is_go_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;
|
||||||
|
|
@ -992,7 +990,7 @@ static void mp_event_common(int data, uint32_t events __unused) {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_kill:
|
do_kill:
|
||||||
if (is_go_device) {
|
if (low_ram_device) {
|
||||||
/* For Go devices kill only one task */
|
/* For Go devices kill only one task */
|
||||||
if (find_and_kill_processes(level, 0) == 0) {
|
if (find_and_kill_processes(level, 0) == 0) {
|
||||||
if (debug_process_killing) {
|
if (debug_process_killing) {
|
||||||
|
|
@ -1228,8 +1226,8 @@ 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);
|
||||||
is_go_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