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:
parent
f85d4216fd
commit
94cd15bf22
10
lmkd.c
10
lmkd.c
|
|
@ -1694,16 +1694,6 @@ do_kill:
|
||||||
static unsigned long report_skip_count = 0;
|
static unsigned long report_skip_count = 0;
|
||||||
|
|
||||||
if (!use_minfree_levels) {
|
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 */
|
/* 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 (mi.field.nr_free_pages >= low_pressure_mem.max_nr_free_pages) {
|
||||||
if (debug_process_killing) {
|
if (debug_process_killing) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue