lmkd: Remove redundant free swap and free memory check

lmkd can't kill processes because it has compare the size between free swap and free memory. Free swap is often larger than the free memory when system is under low memory with less swap-backed or swappable pages and finally leads to I/O thrashing.

Test: TreeHugger
Bug: 124727769
Change-Id: Ia2848859aa97a24bd13c704acee4b86cd2d3f647
This commit is contained in:
Juju Sung 2019-02-20 00:41:28 +08:00 committed by juju sung
parent f85d4216fd
commit 94cd15bf22
1 changed files with 0 additions and 10 deletions

10
lmkd.c
View File

@ -1694,16 +1694,6 @@ do_kill:
static unsigned long report_skip_count = 0;
if (!use_minfree_levels) {
/* If pressure level is less than critical and enough free swap then ignore */
if (level < VMPRESS_LEVEL_CRITICAL &&
mi.field.free_swap > low_pressure_mem.max_nr_free_pages) {
if (debug_process_killing) {
ALOGI("Ignoring pressure since %" PRId64
" swap pages are available ",
mi.field.free_swap);
}
return;
}
/* Free up enough memory to downgrate the memory pressure to low level */
if (mi.field.nr_free_pages >= low_pressure_mem.max_nr_free_pages) {
if (debug_process_killing) {