summaryrefslogtreecommitdiffstats
path: root/lmkd
diff options
context:
space:
mode:
authorSuren Baghdasaryan2018-04-13 13:45:38 -0500
committerSuren Baghdasaryan2018-04-13 18:24:09 -0500
commitff61afb002d7683b309b2b174fc7b18d30e5dbd1 (patch)
treef9a45600a1b2b5d3fc0afd7591ffb793cba236dc /lmkd
parentb518418fbb8e263916c8364f52ea125793cf3d39 (diff)
downloadplatform-system-core-ff61afb002d7683b309b2b174fc7b18d30e5dbd1.tar.gz
platform-system-core-ff61afb002d7683b309b2b174fc7b18d30e5dbd1.tar.xz
platform-system-core-ff61afb002d7683b309b2b174fc7b18d30e5dbd1.zip
lmkd: Rename is_go_device variable to better reflect its function
Rename is_go_device variable to low_ram_device to better reflect its meaning and relation to ro.config.low_ram variable. Change-Id: I6e2eaebe79cf2e6edf861f7c602e52a5b573ad0a Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Diffstat (limited to 'lmkd')
-rw-r--r--lmkd/lmkd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lmkd/lmkd.c b/lmkd/lmkd.c
index f7c90ec0b..f19b43e41 100644
--- a/lmkd/lmkd.c
+++ b/lmkd/lmkd.c
@@ -110,7 +110,7 @@ static bool debug_process_killing;
110static bool enable_pressure_upgrade; 110static bool enable_pressure_upgrade;
111static int64_t upgrade_pressure; 111static int64_t upgrade_pressure;
112static int64_t downgrade_pressure; 112static int64_t downgrade_pressure;
113static bool is_go_device; 113static bool low_ram_device;
114static bool kill_heaviest_task; 114static bool kill_heaviest_task;
115static unsigned long kill_timeout_ms; 115static unsigned long kill_timeout_ms;
116 116
@@ -788,7 +788,7 @@ static int find_and_kill_processes(enum vmpressure_level level,
788 struct proc *procp; 788 struct proc *procp;
789 789
790 while (true) { 790 while (true) {
791 if (is_go_device) 791 if (low_ram_device)
792 procp = proc_adj_lru(i); 792 procp = proc_adj_lru(i);
793 else 793 else
794 procp = proc_get_heaviest(i); 794 procp = proc_get_heaviest(i);
@@ -966,7 +966,7 @@ static void mp_event_common(int data, uint32_t events __unused) {
966 } 966 }
967 967
968do_kill: 968do_kill:
969 if (is_go_device) { 969 if (low_ram_device) {
970 /* For Go devices kill only one task */ 970 /* For Go devices kill only one task */
971 if (find_and_kill_processes(level, 0) == 0) { 971 if (find_and_kill_processes(level, 0) == 0) {
972 if (debug_process_killing) { 972 if (debug_process_killing) {
@@ -1203,7 +1203,7 @@ int main(int argc __unused, char **argv __unused) {
1203 (int64_t)property_get_int32("ro.lmk.downgrade_pressure", 100); 1203 (int64_t)property_get_int32("ro.lmk.downgrade_pressure", 100);
1204 kill_heaviest_task = 1204 kill_heaviest_task =
1205 property_get_bool("ro.lmk.kill_heaviest_task", true); 1205 property_get_bool("ro.lmk.kill_heaviest_task", true);
1206 is_go_device = property_get_bool("ro.config.low_ram", false); 1206 low_ram_device = property_get_bool("ro.config.low_ram", false);
1207 kill_timeout_ms = 1207 kill_timeout_ms =
1208 (unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0); 1208 (unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0);
1209 1209