]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: refactor inactive_file_is_low() to use get_lru_size()
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 7 Feb 2013 01:27:04 +0000 (12:27 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:46:49 +0000 (16:46 +1100)
commitbdce08fb9964867d73ce5eb951258d2bea74421c
tree2c8bbb3ed59fca73f9f715f962e3b4aee8133edf
parent82c9377cdab1b28578258c6ec66b2013aaec72d6
mm: refactor inactive_file_is_low() to use get_lru_size()

An inactive file list is considered low when its active counterpart is
bigger, regardless of whether it is a global zone LRU list or a memcg zone
LRU list.  The only difference is in how the LRU size is assessed.

get_lru_size() does the right thing for both global and memcg reclaim
situations.

Get rid of inactive_file_is_low_global() and
mem_cgroup_inactive_file_is_low() by using get_lru_size() and compare the
numbers in common code.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/memcontrol.h
mm/memcontrol.c
mm/vmscan.c