Skip to content

RFC Memory cgroup hierarchy introduction (v3)

Balbir Singh linux-mm lkml 1 version In review

Get series with b4
b4 am 20081111123314.6566.54133.sendpatchset@balbir-laptop

Versions newest first

  1. v1 RFC Latest4 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Memory cgroup hierarchy documentation (v3)Documentation/controllers/memory.txt+37 -00 replies
2/4Memory cgroup resource counters for hierarchy (v3)include/linux/res_counter.h kernel/res_counter.c mm/memcontrol.c+46 -130 replies
3/4Memory cgroup hierarchical reclaim (v3)mm/memcontrol.c+152 -2712 replies
4/4Memory cgroup hierarchy feature selector (v3)mm/memcontrol.c+51 -13 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC][mm][PATCH 0/4] Memory cgroup hierarchy introduction (v3)

This patch follows several iterations of the memory controller hierarchy patches. The hardwall approach by Kamezawa-San[1]. Version 1 of this patchset at [2].

The current approach is based on [2] and has the following properties

1. Hierarchies are very natural in a filesystem like the cgroup filesystem. A multi-tree hierarchy has been supported for a long time in filesystems. When the feature is turned on, we honor hierarchies such that the root accounts for resource usage of all children and limits can be set at any point in the hierarchy. Any memory cgroup is limited by limits along the hierarchy. The total usage of all children of a node cannot exceed the limit of the node.
2. The hierarchy feature is selectable and off by default
3. Hierarchies are expensive and the trade off is depth versus performance. Hierarchies can also be completely turned off.

The patches are against 2.6.28-rc2-mm1 and were tested in a KVM instance with SMP and swap turned on.

v3..v2
======
1. Hierarchy selection logic, now allows use_hierarchy changes only if parent's use_hierarchy is set to 0 and there are no children
2. last_scanned_child is protected by cgroup_lock()
3. cgroup_lock() is released before lru_add_drain_all() in mem_cgroup_force_empty()

v2..v1
======
1. The hierarchy is now selectable per-subtree
2. The features file has been renamed to use_hierarchy
3. Reclaim now holds cgroup lock and the reclaim does recursive walk and reclaim

Acknowledgements
----------------

Thanks for the feedback from Li Zefan, Kamezawa Hiroyuki, Paul Menage and others.

Series
------

memcg-hierarchy-documentation.patch
resource-counters-hierarchy-support.patch
memcg-hierarchical-reclaim.patch
memcg-add-hierarchy-selector.patch

Reviews? Comments?

References

1. http://linux.derkeiler.com/Mailing-Lists/Kernel/2008-06/msg05417.html
2. http://kerneltrap.org/mailarchive/linux-kernel/2008/4/19/1513644/thread

Signature · 7 lines
	Balbir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>