]> git.baikalelectronics.ru Git - kernel.git/commit
mm: free swap cache aggressively if memcg swap is full
authorVladimir Davydov <vdavydov@virtuozzo.com>
Wed, 20 Jan 2016 23:03:10 +0000 (15:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2016 01:09:18 +0000 (17:09 -0800)
commitc841e1d88b8c0a05a34b319838b1a3c0141d68c7
tree14406eb21280bafa4a447d4b45ea5bd6caa354af
parent5dd5d54a38b87b903d30505796321134906cac84
mm: free swap cache aggressively if memcg swap is full

Swap cache pages are freed aggressively if swap is nearly full (>50%
currently), because otherwise we are likely to stop scanning anonymous
when we near the swap limit even if there is plenty of freeable swap cache
pages.  We should follow the same trend in case of memory cgroup, which
has its own swap limit.

Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/swap.h
mm/memcontrol.c
mm/memory.c
mm/swapfile.c
mm/vmscan.c