Skip to content

RSS controller based on process containers (v2)

Pavel Emelianov linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 13 repliesIn review

Changes from previous version from the cover letter

* reclamation code reuse. I.e. the scanner code used to reclaim pages on global memory shortage is used as-is in per-container page reclamation;
* active/inactive per-container lists (a bit reworked patch from Balbir);
* more elegant top container creation (thanks Paul for clarifying).

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8Resource countersinclude/linux/res_counter.h init/Kconfig kernel/Makefile +1 more+160 -00 replies
2/8Add container pointer on struct pageinclude/linux/mm.h include/linux/mm_types.h+9 -02 replies
3/8Add container pointer on mm_structinclude/linux/sched.h kernel/fork.c+13 -30 replies
4/8RSS container coreinclude/linux/container_subsys.h include/linux/rss_container.h init/Kconfig +2 more+346 -00 replies
5/8RSS accounting hooks over the codefs/exec.c include/linux/rmap.h mm/fremap.c +4 more+121 -280 replies
6/8Per container OOM killerinclude/linux/rss_container.h mm/oom_kill.c+39 -40 replies
7/8Page scanner changes needed to implement per-container scannermm/vmscan.c+57 -230 replies
8/8Per-container pages reclamationinclude/linux/rss_container.h include/linux/swap.h mm/rss_container.c +2 more+114 -08 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] RSS controller based on process containers (v2)

Adds RSS accounting and control within a container.

Major change: current scanner code reuse.

Tasks and files accounting is not included as these containers are simple enough to be implemented later.

Based on top of Paul Menage's container subsystem v8. Note, that only first three patches from Paul's patchset should be used as BeanCounters, CPU accounting etc are not needed for RSS container.

RSS container includes the per-container RSS accounting and reclamation, and out-of-memory killer. The container behaves like a standalone machine - when it runs out of resources, it tries to reclaim some pages, and if it doesn't succeed, kills some task which mm_struct belongs to the container in question.

Changes from previous version:
* reclamation code reuse. I.e. the scanner code used to reclaim pages on global memory shortage is used as-is in per-container page reclamation;
* active/inactive per-container lists (a bit reworked patch from Balbir);
* more elegant top container creation (thanks Paul for clarifying).