Skip to content

Commit 502b24c

Browse files
committed
Merge branch 'for-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo: "Nothing too drastic. - Removal of synchronize_rcu() from userland visible paths. - Various fixes and cleanups from Li. - cgroup_rightmost_descendant() added which will be used by cpuset changes (it will be a separate pull request)." * 'for-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fail if monitored file and event_control are in different cgroup cgroup: fix cgroup_rmdir() vs close(eventfd) race cpuset: fix cpuset_print_task_mems_allowed() vs rename() race cgroup: fix exit() vs rmdir() race cgroup: remove bogus comments in cgroup_diput() cgroup: remove synchronize_rcu() from cgroup_diput() cgroup: remove duplicate RCU free on struct cgroup sched: remove redundant NULL cgroup check in task_group_path() sched: split out css_online/css_offline from tg creation/destruction cgroup: initialize cgrp->dentry before css_alloc() cgroup: remove a NULL check in cgroup_exit() cgroup: fix bogus kernel warnings when cgroup_create() failed cgroup: remove synchronize_rcu() from rebind_subsystems() cgroup: remove synchronize_rcu() from cgroup_attach_{task|proc}() cgroup: use new hashtable implementation cgroups: fix cgroup_event_listener error handling cgroups: move cgroup_event_listener.c to tools/cgroup cgroup: implement cgroup_rightmost_descendant() cgroup: remove unused dummy cgroup_fork_callbacks()
2 parents ece8e0b + f169007 commit 502b24c

13 files changed

Lines changed: 270 additions & 203 deletions

File tree

‎Documentation/cgroups/00-INDEX‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ blkio-controller.txt
44
- Description for Block IO Controller, implementation and usage details.
55
cgroups.txt
66
- Control Groups definition, implementation details, examples and API.
7-
cgroup_event_listener.c
8-
- A user program for cgroup listener.
97
cpuacct.txt
108
- CPU Accounting Controller; account CPU usage for groups of tasks.
119
cpusets.txt

‎Documentation/cgroups/memcg_test.txt‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y.
399399

400400
9.10 Memory thresholds
401401
Memory controller implements memory thresholds using cgroups notification
402-
API. You can use Documentation/cgroups/cgroup_event_listener.c to test
403-
it.
402+
API. You can use tools/cgroup/cgroup_event_listener.c to test it.
404403

405404
(Shell-A) Create cgroup and run event listener
406405
# mkdir /cgroup/A

‎include/linux/cgroup.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ struct cgroup {
203203

204204
/* For RCU-protected deletion */
205205
struct rcu_head rcu_head;
206+
struct work_struct free_work;
206207

207208
/* List of events which userspace want to receive */
208209
struct list_head event_list;
@@ -558,6 +559,7 @@ static inline struct cgroup* task_cgroup(struct task_struct *task,
558559

559560
struct cgroup *cgroup_next_descendant_pre(struct cgroup *pos,
560561
struct cgroup *cgroup);
562+
struct cgroup *cgroup_rightmost_descendant(struct cgroup *pos);
561563

562564
/**
563565
* cgroup_for_each_descendant_pre - pre-order walk of a cgroup's descendants
@@ -706,7 +708,6 @@ struct cgroup_subsys_state *cgroup_css_from_dir(struct file *f, int id);
706708
static inline int cgroup_init_early(void) { return 0; }
707709
static inline int cgroup_init(void) { return 0; }
708710
static inline void cgroup_fork(struct task_struct *p) {}
709-
static inline void cgroup_fork_callbacks(struct task_struct *p) {}
710711
static inline void cgroup_post_fork(struct task_struct *p) {}
711712
static inline void cgroup_exit(struct task_struct *p, int callbacks) {}
712713

‎include/linux/sched.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,10 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);
26592659
extern struct task_group root_task_group;
26602660

26612661
extern struct task_group *sched_create_group(struct task_group *parent);
2662+
extern void sched_online_group(struct task_group *tg,
2663+
struct task_group *parent);
26622664
extern void sched_destroy_group(struct task_group *tg);
2665+
extern void sched_offline_group(struct task_group *tg);
26632666
extern void sched_move_task(struct task_struct *tsk);
26642667
#ifdef CONFIG_FAIR_GROUP_SCHED
26652668
extern int sched_group_set_shares(struct task_group *tg, unsigned long shares);

0 commit comments

Comments
 (0)