diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 15:59:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 15:59:24 -0500 |
commit | db0c2bf69aa095d4a6de7b1145f29fe9a7c0f6a3 (patch) | |
tree | 8f38957c01b18edddd44d49ecc3beeac08a20b4e /include/linux/cgroup.h | |
parent | ac69e0928054ff29a5049902fb477f9c7605c773 (diff) | |
parent | 0d19ea866562e46989412a0676412fa0983c9ce7 (diff) |
Merge branch 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
* 'for-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (21 commits)
cgroup: fix to allow mounting a hierarchy by name
cgroup: move assignement out of condition in cgroup_attach_proc()
cgroup: Remove task_lock() from cgroup_post_fork()
cgroup: add sparse annotation to cgroup_iter_start() and cgroup_iter_end()
cgroup: mark cgroup_rmdir_waitq and cgroup_attach_proc() as static
cgroup: only need to check oldcgrp==newgrp once
cgroup: remove redundant get/put of task struct
cgroup: remove redundant get/put of old css_set from migrate
cgroup: Remove unnecessary task_lock before fetching css_set on migration
cgroup: Drop task_lock(parent) on cgroup_fork()
cgroups: remove redundant get/put of css_set from css_set_check_fetched()
resource cgroups: remove bogus cast
cgroup: kill subsys->can_attach_task(), pre_attach() and attach_task()
cgroup, cpuset: don't use ss->pre_attach()
cgroup: don't use subsys->can_attach_task() or ->attach_task()
cgroup: introduce cgroup_taskset and use it in subsys->can_attach(), cancel_attach() and attach()
cgroup: improve old cgroup handling in cgroup_attach_proc()
cgroup: always lock threadgroup during migration
threadgroup: extend threadgroup_lock() to cover exit and exec
threadgroup: rename signal->threadgroup_fork_lock to ->group_rwsem
...
Fix up conflict in kernel/cgroup.c due to commit e0197aae59e5: "cgroups:
fix a css_set not found bug in cgroup_attach_proc" that already
mentioned that the bug is fixed (differently) in Tejun's cgroup
patchset. This one, in other words.
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index a17becc36ca..e9b602151ca 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -457,6 +457,28 @@ void cgroup_exclude_rmdir(struct cgroup_subsys_state *css); | |||
457 | void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css); | 457 | void cgroup_release_and_wakeup_rmdir(struct cgroup_subsys_state *css); |
458 | 458 | ||
459 | /* | 459 | /* |
460 | * Control Group taskset, used to pass around set of tasks to cgroup_subsys | ||
461 | * methods. | ||
462 | */ | ||
463 | struct cgroup_taskset; | ||
464 | struct task_struct *cgroup_taskset_first(struct cgroup_taskset *tset); | ||
465 | struct task_struct *cgroup_taskset_next(struct cgroup_taskset *tset); | ||
466 | struct cgroup *cgroup_taskset_cur_cgroup(struct cgroup_taskset *tset); | ||
467 | int cgroup_taskset_size(struct cgroup_taskset *tset); | ||
468 | |||
469 | /** | ||
470 | * cgroup_taskset_for_each - iterate cgroup_taskset | ||
471 | * @task: the loop cursor | ||
472 | * @skip_cgrp: skip if task's cgroup matches this, %NULL to iterate through all | ||
473 | * @tset: taskset to iterate | ||
474 | */ | ||
475 | #define cgroup_taskset_for_each(task, skip_cgrp, tset) \ | ||
476 | for ((task) = cgroup_taskset_first((tset)); (task); \ | ||
477 | (task) = cgroup_taskset_next((tset))) \ | ||
478 | if (!(skip_cgrp) || \ | ||
479 | cgroup_taskset_cur_cgroup((tset)) != (skip_cgrp)) | ||
480 | |||
481 | /* | ||
460 | * Control Group subsystem type. | 482 | * Control Group subsystem type. |
461 | * See Documentation/cgroups/cgroups.txt for details | 483 | * See Documentation/cgroups/cgroups.txt for details |
462 | */ | 484 | */ |
@@ -467,14 +489,11 @@ struct cgroup_subsys { | |||
467 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 489 | int (*pre_destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
468 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); | 490 | void (*destroy)(struct cgroup_subsys *ss, struct cgroup *cgrp); |
469 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 491 | int (*can_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
470 | struct task_struct *tsk); | 492 | struct cgroup_taskset *tset); |
471 | int (*can_attach_task)(struct cgroup *cgrp, struct task_struct *tsk); | ||
472 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 493 | void (*cancel_attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
473 | struct task_struct *tsk); | 494 | struct cgroup_taskset *tset); |
474 | void (*pre_attach)(struct cgroup *cgrp); | ||
475 | void (*attach_task)(struct cgroup *cgrp, struct task_struct *tsk); | ||
476 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 495 | void (*attach)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
477 | struct cgroup *old_cgrp, struct task_struct *tsk); | 496 | struct cgroup_taskset *tset); |
478 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); | 497 | void (*fork)(struct cgroup_subsys *ss, struct task_struct *task); |
479 | void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp, | 498 | void (*exit)(struct cgroup_subsys *ss, struct cgroup *cgrp, |
480 | struct cgroup *old_cgrp, struct task_struct *task); | 499 | struct cgroup *old_cgrp, struct task_struct *task); |