Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365587
b: refs/heads/master
c: 84cfb6a
h: refs/heads/master
i:
  365585: 7f09c81
  365583: 80cd6a4
v: v3
  • Loading branch information
Rami Rosen authored and Tejun Heo committed Apr 10, 2013
1 parent 6eed85d commit fa42fd5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8adf12b0ffd0a10340bab355e586f8533a69630d
refs/heads/master: 84cfb6ab484b442d5115eb3baf9db7d74a3ea626
20 changes: 5 additions & 15 deletions trunk/Documentation/cgroups/cgroups.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,9 @@ matches, and any of the requested subsystems are in use in an existing
hierarchy, the mount will fail with -EBUSY. Otherwise, a new hierarchy
is activated, associated with the requested subsystems.

It's not currently possible to bind a new subsystem to an active
cgroup hierarchy, or to unbind a subsystem from an active cgroup
hierarchy. This may be possible in future, but is fraught with nasty
error-recovery issues.
It's not possible to bind a new subsystem to an active cgroup
hierarchy, or to unbind a subsystem from an active cgroup
hierarchy.

When a cgroup filesystem is unmounted, if there are any
child cgroups created below the top-level cgroup, that hierarchy
Expand Down Expand Up @@ -382,10 +381,8 @@ To Specify a hierarchy's release_agent:

Note that specifying 'release_agent' more than once will return failure.

Note that changing the set of subsystems is currently only supported
when the hierarchy consists of a single (root) cgroup. Supporting
the ability to arbitrarily bind/unbind subsystems from an existing
cgroup hierarchy is intended to be implemented in the future.
Note that changing the set of subsystems is only supported when the
hierarchy consists of a single (root) cgroup.

Then under /sys/fs/cgroup/rg1 you can find a tree that corresponds to the
tree of the cgroups in the system. For instance, /sys/fs/cgroup/rg1
Expand Down Expand Up @@ -643,13 +640,6 @@ void exit(struct task_struct *task)

Called during task exit.

void bind(struct cgroup *root)
(cgroup_mutex held by caller)

Called when a cgroup subsystem is rebound to a different hierarchy
and root cgroup. Currently this will only involve movement between
the default hierarchy (which never has sub-cgroups) and a hierarchy
that is being created/destroyed (and hence has no sub-cgroups).

4. Extended attribute usage
===========================
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/linux/cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,6 @@ struct cgroup_subsys {
void (*fork)(struct task_struct *task);
void (*exit)(struct cgroup *cgrp, struct cgroup *old_cgrp,
struct task_struct *task);
void (*bind)(struct cgroup *root);

int subsys_id;
int active;
int disabled;
Expand Down
4 changes: 0 additions & 4 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,16 +1064,12 @@ static int rebind_subsystems(struct cgroupfs_root *root,
cgrp->subsys[i]->cgroup = cgrp;
list_move(&ss->sibling, &root->subsys_list);
ss->root = root;
if (ss->bind)
ss->bind(cgrp);
/* refcount was already taken, and we're keeping it */
} else if (bit & removed_mask) {
/* We're removing this subsystem */
BUG_ON(ss == NULL);
BUG_ON(cgrp->subsys[i] != dummytop->subsys[i]);
BUG_ON(cgrp->subsys[i]->cgroup != cgrp);
if (ss->bind)
ss->bind(dummytop);
dummytop->subsys[i]->cgroup = dummytop;
cgrp->subsys[i] = NULL;
subsys[i]->root = &rootnode;
Expand Down

0 comments on commit fa42fd5

Please sign in to comment.