Skip to content

Commit

Permalink
lmk: fix lowmem_scan
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Franco <[email protected]>
  • Loading branch information
franciscofranco committed May 11, 2018
1 parent 86381da commit 230819b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/android/lowmemorykiller.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
return 0;
}

other_free = global_page_state(NR_FREE_PAGES);
other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages;
other_file = global_page_state(NR_FILE_PAGES) -
global_page_state(NR_SHMEM) -
global_page_state(NR_UNEVICTABLE) -
total_swapcache_pages;
total_swapcache_pages();

tune_lmk_param(&other_free, &other_file, sc);

Expand Down

0 comments on commit 230819b

Please sign in to comment.