diff options
author | Suren Baghdasaryan <surenb@google.com> | 2018-04-13 11:45:38 -0700 |
---|---|---|
committer | Suren Baghdasaryan <surenb@google.com> | 2018-04-16 09:27:32 -0700 |
commit | 39a22e751b7392f8276338195cdd9b52aae9bb10 (patch) | |
tree | c10c58c52f96f8a43dbf0f57a2f04089cf17f5c4 /lmkd | |
parent | 9dbd937b4c790aa25e0be737cf41e583ac430a18 (diff) | |
download | system_core-39a22e751b7392f8276338195cdd9b52aae9bb10.tar.gz system_core-39a22e751b7392f8276338195cdd9b52aae9bb10.tar.bz2 system_core-39a22e751b7392f8276338195cdd9b52aae9bb10.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.
Bug: 77299493
Bug: 75322373
Change-Id: I6e2eaebe79cf2e6edf861f7c602e52a5b573ad0a
Merged-In: I6e2eaebe79cf2e6edf861f7c602e52a5b573ad0a
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
(cherry picked from commit fe2be6cc44073b7ef09ca849004e5072bdf18857)
Diffstat (limited to 'lmkd')
-rw-r--r-- | lmkd/lmkd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lmkd/lmkd.c b/lmkd/lmkd.c index ee2f343d9..5f27dfcfb 100644 --- a/lmkd/lmkd.c +++ b/lmkd/lmkd.c @@ -112,7 +112,7 @@ static bool debug_process_killing; static bool enable_pressure_upgrade; static int64_t upgrade_pressure; static int64_t downgrade_pressure; -static bool is_go_device; +static bool low_ram_device; static bool kill_heaviest_task; static unsigned long kill_timeout_ms; @@ -771,7 +771,7 @@ static int find_and_kill_processes(enum vmpressure_level level, struct proc *procp; while (true) { - if (is_go_device) + if (low_ram_device) procp = proc_adj_lru(i); else procp = proc_get_heaviest(i); @@ -962,7 +962,7 @@ static void mp_event_common(int data, uint32_t events __unused) { } do_kill: - if (is_go_device) { + if (low_ram_device) { /* For Go devices kill only one task */ if (find_and_kill_processes(level, 0) == 0) { if (debug_process_killing) { @@ -1199,7 +1199,7 @@ int main(int argc __unused, char **argv __unused) { (int64_t)property_get_int32("ro.lmk.downgrade_pressure", 100); kill_heaviest_task = property_get_bool("ro.lmk.kill_heaviest_task", true); - 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 = (unsigned long)property_get_int32("ro.lmk.kill_timeout_ms", 0); |