Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-08 Thread Tejun Heo
Hey, Michal. On Thu, Nov 08, 2012 at 10:50:13AM +0100, Michal Hocko wrote: > On Sat 03-11-12 01:38:29, Tejun Heo wrote: > > Currently, cgroup doesn't provide any generic helper for walking a > > given cgroup's children or descendants. This patch adds the following > > three macros. > > > > * cgr

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-08 Thread Michal Hocko
On Sat 03-11-12 01:38:29, Tejun Heo wrote: > Currently, cgroup doesn't provide any generic helper for walking a > given cgroup's children or descendants. This patch adds the following > three macros. > > * cgroup_for_each_child() - walk immediate children of a cgroup. > > * cgroup_for_each_desce

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-07 Thread Kamezawa Hiroyuki
(2012/11/03 17:38), Tejun Heo wrote: > Currently, cgroup doesn't provide any generic helper for walking a > given cgroup's children or descendants. This patch adds the following > three macros. > > * cgroup_for_each_child() - walk immediate children of a cgroup. > > * cgroup_for_each_descendant_

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-07 Thread Michal Hocko
On Wed 07-11-12 09:01:18, Tejun Heo wrote: > Hello, Michal. > > On Wed, Nov 07, 2012 at 05:54:57PM +0100, Michal Hocko wrote: > > > +struct cgroup *cgroup_next_descendant_pre(struct cgroup *pos, > > > + struct cgroup *cgroup) > > > +{ > > > + struct cgroup *next;

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-07 Thread Tejun Heo
Hello, Michal. On Wed, Nov 07, 2012 at 05:54:57PM +0100, Michal Hocko wrote: > > +struct cgroup *cgroup_next_descendant_pre(struct cgroup *pos, > > + struct cgroup *cgroup) > > +{ > > + struct cgroup *next; > > + > > + WARN_ON_ONCE(!rcu_read_lock_held()); >

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-07 Thread Michal Hocko
On Sat 03-11-12 01:38:29, Tejun Heo wrote: [...] > diff --git a/kernel/cgroup.c b/kernel/cgroup.c > index cc5d2a0..8bd662c 100644 > --- a/kernel/cgroup.c > +++ b/kernel/cgroup.c > @@ -2985,6 +2985,92 @@ static void cgroup_enable_task_cg_lists(void) > write_unlock(&css_set_lock); > } > > +/

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-07 Thread Michal Hocko
On Tue 06-11-12 12:31:54, Tejun Heo wrote: > On Sat, Nov 03, 2012 at 01:38:29AM -0700, Tejun Heo wrote: > > Currently, cgroup doesn't provide any generic helper for walking a > > given cgroup's children or descendants. This patch adds the following > > three macros. > > > > * cgroup_for_each_chil

Re: [PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-06 Thread Tejun Heo
On Sat, Nov 03, 2012 at 01:38:29AM -0700, Tejun Heo wrote: > Currently, cgroup doesn't provide any generic helper for walking a > given cgroup's children or descendants. This patch adds the following > three macros. > > * cgroup_for_each_child() - walk immediate children of a cgroup. > > * cgrou

[PATCH 3/9] cgroup: implement generic child / descendant walk macros

2012-11-03 Thread Tejun Heo
Currently, cgroup doesn't provide any generic helper for walking a given cgroup's children or descendants. This patch adds the following three macros. * cgroup_for_each_child() - walk immediate children of a cgroup. * cgroup_for_each_descendant_pre() - visit all descendants of a cgroup in pre-