This series patches add swap control for memory cgroup. Patch[1] add page type in memory.reclaim interface to support reclaim anon pages. Patch[2] add memory.force_swapin interface to support swap back pages proactively. Patch[3-5] add memory.swapfile interface to limit available swap device for memory cgroup. Patch[6] add memory.swap.max interface to limit usage of swap for memory cgroup.
Liu Shixin (6): memcg: add page type to memory.reclaim interface memcg: introduce per-memcg swapin interface mm/swapfile: introduce per-memcg swapfile control mm: swap_slots: add per-type slot cache mm: swap_slots: allocate per-type slot cache when online swap device memcg: add restrict to swap to cgroup1
.../admin-guide/cgroup-v1/memory.rst | 2 + Documentation/admin-guide/cgroup-v2.rst | 9 +- include/linux/memcontrol.h | 27 ++ include/linux/mm.h | 1 + include/linux/swap.h | 10 +- include/linux/swap_slots.h | 2 +- mm/Kconfig | 8 + mm/madvise.c | 19 ++ mm/memcontrol.c | 297 +++++++++++++++++- mm/swap_slots.c | 136 +++++++- mm/swapfile.c | 88 +++++- mm/vmscan.c | 17 + 12 files changed, 590 insertions(+), 26 deletions(-)