cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/9] Add container support for cgroup
@ 2012-12-17  6:43 Gao feng
       [not found] ` <1355726615-15224-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: Gao feng @ 2012-12-17  6:43 UTC (permalink / raw)
  To: cgroups-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: tj-DgEjT+Ai2ygdnm+yROfE0A, lizefan-hv44wF8Li93QT0dZR+AlfA,
	ebiederm-aS9lmoZGLiVWk0Htik3J/w,
	serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw,
	glommer-bzQdu9zFT3WakBO8gow8eQ, Gao feng

Right now,if we mount cgroup in the container,we will get
host's cgroup informations and even we can change host's
cgroup in container.

So the resource controller of the container will lose
effectiveness.

This patchset try to add contianer support for cgroup.
the main idea is allocateing cgroup super-block for each
cgroup mounted in different pid namespace.

The top cgroup of container will share css with host.
When the cgroup being mounted in contianer,the tasks in
this container will be attached to this new mounted
hierarchy's top cgroup, And when unmounting cgroup in
container,these tasks will be attached back to host's cgroup.

Since the container can change the shared css through it's
cgroup subsystem files. patch 7/8 disable the write permission
of container's top cgroup files. In my TODO list, container
will have it's own css, this problem will disappear.


This patchset is sent as RFC,any comments are welcome.
Maybe this isn't the best solution, if you have better
solution,Please let me know.


Gao feng (9):
  cgroup: introduce cgroupfs_root flag ROOT_NAMESPACE
  cgroup: introduce the top root
  cgroup: use root->top_root instead of root
  introduce helper function cgroup_in_root
  cgroup: add container support for cgroup
  pidns: move next_tgid to kernel/pid.c
  cgroup: attach container's tasks to proper cgroup
  cgroup: disallow container to change top cgroup's subsys files
  cgroup: rework cgroup_path

 fs/proc/base.c        |   43 ------
 include/linux/sched.h |    8 +
 kernel/cgroup.c       |  344 ++++++++++++++++++++++++++++++++++++++----------
 kernel/pid.c          |   39 ++++++
 4 files changed, 319 insertions(+), 115 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-12-19 21:39 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17  6:43 [RFC PATCH 0/9] Add container support for cgroup Gao feng
     [not found] ` <1355726615-15224-1-git-send-email-gaofeng-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-12-17  6:43   ` [RFC PATCH 1/9] cgroup: introduce cgroupfs_root flag ROOT_NAMESPACE Gao feng
2012-12-17  6:43   ` [RFC PATCH 2/9] cgroup: introduce the top root Gao feng
2012-12-17  6:43   ` [RFC PATCH 3/9] cgroup: use root->top_root instead of root Gao feng
2012-12-17  6:43   ` [RFC PATCH 4/9] introduce helper function cgroup_in_root Gao feng
2012-12-17  6:43   ` [RFC PATCH 5/9] cgroup: add container support for cgroup Gao feng
2012-12-17  6:43   ` [RFC PATCH 6/9] pidns: move next_tgid to kernel/pid.c Gao feng
2012-12-17  6:43   ` [RFC PATCH 7/9] cgroup: attach container's tasks to proper cgroup Gao feng
2012-12-17  6:43   ` [RFC PATCH 8/9] cgroup: disallow container to change top cgroup's subsys files Gao feng
2012-12-17  6:43   ` [RFC PATCH 9/9] cgroup: rework cgroup_path Gao feng
2012-12-17  8:08   ` [RFC PATCH 0/9] Add container support for cgroup Glauber Costa
     [not found]     ` <50CED2FD.1040509-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-12-17  8:54       ` Gao feng
2012-12-19 21:39       ` Serge Hallyn
2012-12-17 13:16   ` Serge Hallyn
2012-12-17 23:48   ` Tejun Heo
     [not found]     ` <20121217234816.GA10220-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2012-12-17 23:54       ` Eric W. Biederman
     [not found]         ` <87obhsgrq7.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2012-12-17 23:56           ` Tejun Heo
2012-12-18  5:37       ` Gao feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).