aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/cgroups/cgroups.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/cgroups/cgroups.txt')
-rw-r--r--Documentation/cgroups/cgroups.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt
index 0b33bfe7dde9..d45082653e3d 100644
--- a/Documentation/cgroups/cgroups.txt
+++ b/Documentation/cgroups/cgroups.txt
@@ -536,10 +536,21 @@ returns an error, this will abort the attach operation. If a NULL
536task is passed, then a successful result indicates that *any* 536task is passed, then a successful result indicates that *any*
537unspecified task can be moved into the cgroup. Note that this isn't 537unspecified task can be moved into the cgroup. Note that this isn't
538called on a fork. If this method returns 0 (success) then this should 538called on a fork. If this method returns 0 (success) then this should
539remain valid while the caller holds cgroup_mutex. If threadgroup is 539remain valid while the caller holds cgroup_mutex and it is ensured that either
540attach() or cancel_attach() will be called in future. If threadgroup is
540true, then a successful result indicates that all threads in the given 541true, then a successful result indicates that all threads in the given
541thread's threadgroup can be moved together. 542thread's threadgroup can be moved together.
542 543
544void cancel_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
545 struct task_struct *task, bool threadgroup)
546(cgroup_mutex held by caller)
547
548Called when a task attach operation has failed after can_attach() has succeeded.
549A subsystem whose can_attach() has some side-effects should provide this
550function, so that the subsytem can implement a rollback. If not, not necessary.
551This will be called only about subsystems whose can_attach() operation have
552succeeded.
553
543void attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 554void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
544 struct cgroup *old_cgrp, struct task_struct *task, 555 struct cgroup *old_cgrp, struct task_struct *task,
545 bool threadgroup) 556 bool threadgroup)