Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-05 Thread Aristeu Rozanski
On Thu, Aug 01, 2013 at 05:49:46PM -0400, Tejun Heo wrote: > cgroup is currently in the process of transitioning to using struct > cgroup_subsys_state * as the primary handle instead of struct cgroup * > in subsystem implementations for the following reasons. > > * With unified hierarchy,

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-05 Thread Vivek Goyal
On Thu, Aug 01, 2013 at 05:49:46PM -0400, Tejun Heo wrote: > cgroup is currently in the process of transitioning to using struct > cgroup_subsys_state * as the primary handle instead of struct cgroup * > in subsystem implementations for the following reasons. > > * With unified hierarchy,

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-05 Thread Vivek Goyal
On Thu, Aug 01, 2013 at 05:49:46PM -0400, Tejun Heo wrote: cgroup is currently in the process of transitioning to using struct cgroup_subsys_state * as the primary handle instead of struct cgroup * in subsystem implementations for the following reasons. * With unified hierarchy, subsystems

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-05 Thread Aristeu Rozanski
On Thu, Aug 01, 2013 at 05:49:46PM -0400, Tejun Heo wrote: cgroup is currently in the process of transitioning to using struct cgroup_subsys_state * as the primary handle instead of struct cgroup * in subsystem implementations for the following reasons. * With unified hierarchy, subsystems

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 03:43:05PM +0200, Michal Hocko wrote: > On Fri 02-08-13 15:19:01, Michal Hocko wrote: > [...] > > mem_cgroup_from_cont can go away now as well. Do you plan to remove it > > in the series or later on? > > Ohh, it goes in 21/23. Good Heh, yeah, that one. Thanks. -- tejun

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 12:02:05PM +0800, Li Zefan wrote: > > @@ -4199,12 +4208,13 @@ static void init_cgroup_css(struct > > cgroup_subsys_state *css, > > /* invoke ->css_online() on a new CSS and mark it online if successful */ > > static int online_css(struct cgroup_subsys *ss, struct cgroup

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 03:19:01PM +0200, Michal Hocko wrote: > mem_cgroup_from_cont can go away now as well. Do you plan to remove it > in the series or later on? IIRC, vmpressure still uses the accessor. It'll get removed later when all the usages are gone. Thanks. -- tejun -- To

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 11:54:24AM +0800, Li Zefan wrote: > > @@ -4298,7 +4308,7 @@ static long cgroup_create(struct cgroup *parent, > > struct dentry *dentry, > > for_each_root_subsys(root, ss) { > > struct cgroup_subsys_state *css; > > > > - css =

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Michal Hocko
On Fri 02-08-13 15:19:01, Michal Hocko wrote: [...] > mem_cgroup_from_cont can go away now as well. Do you plan to remove it > in the series or later on? Ohh, it goes in 21/23. Good Thanks! -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Michal Hocko
On Thu 01-08-13 17:49:46, Tejun Heo wrote: > cgroup is currently in the process of transitioning to using struct > cgroup_subsys_state * as the primary handle instead of struct cgroup * > in subsystem implementations for the following reasons. > > * With unified hierarchy, subsystems will be

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Michal Hocko
On Thu 01-08-13 17:49:46, Tejun Heo wrote: cgroup is currently in the process of transitioning to using struct cgroup_subsys_state * as the primary handle instead of struct cgroup * in subsystem implementations for the following reasons. * With unified hierarchy, subsystems will be

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Michal Hocko
On Fri 02-08-13 15:19:01, Michal Hocko wrote: [...] mem_cgroup_from_cont can go away now as well. Do you plan to remove it in the series or later on? Ohh, it goes in 21/23. Good Thanks! -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 11:54:24AM +0800, Li Zefan wrote: @@ -4298,7 +4308,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, for_each_root_subsys(root, ss) { struct cgroup_subsys_state *css; - css = ss-css_alloc(cgrp); +

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 03:19:01PM +0200, Michal Hocko wrote: mem_cgroup_from_cont can go away now as well. Do you plan to remove it in the series or later on? IIRC, vmpressure still uses the accessor. It'll get removed later when all the usages are gone. Thanks. -- tejun -- To unsubscribe

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 12:02:05PM +0800, Li Zefan wrote: @@ -4199,12 +4208,13 @@ static void init_cgroup_css(struct cgroup_subsys_state *css, /* invoke -css_online() on a new CSS and mark it online if successful */ static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp)

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-02 Thread Tejun Heo
On Fri, Aug 02, 2013 at 03:43:05PM +0200, Michal Hocko wrote: On Fri 02-08-13 15:19:01, Michal Hocko wrote: [...] mem_cgroup_from_cont can go away now as well. Do you plan to remove it in the series or later on? Ohh, it goes in 21/23. Good Heh, yeah, that one. Thanks. -- tejun -- To

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-01 Thread Li Zefan
> @@ -4199,12 +4208,13 @@ static void init_cgroup_css(struct > cgroup_subsys_state *css, > /* invoke ->css_online() on a new CSS and mark it online if successful */ > static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp) > { > + struct cgroup_subsys_state *css =

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-01 Thread Li Zefan
> @@ -4298,7 +4308,7 @@ static long cgroup_create(struct cgroup *parent, struct > dentry *dentry, > for_each_root_subsys(root, ss) { > struct cgroup_subsys_state *css; > > - css = ss->css_alloc(cgrp); > + css =

[PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-01 Thread Tejun Heo
cgroup is currently in the process of transitioning to using struct cgroup_subsys_state * as the primary handle instead of struct cgroup * in subsystem implementations for the following reasons. * With unified hierarchy, subsystems will be dynamically bound and unbound from cgroups and thus

[PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-01 Thread Tejun Heo
cgroup is currently in the process of transitioning to using struct cgroup_subsys_state * as the primary handle instead of struct cgroup * in subsystem implementations for the following reasons. * With unified hierarchy, subsystems will be dynamically bound and unbound from cgroups and thus

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-01 Thread Li Zefan
@@ -4298,7 +4308,7 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry, for_each_root_subsys(root, ss) { struct cgroup_subsys_state *css; - css = ss-css_alloc(cgrp); + css = ss-css_alloc(parent-subsys[ss-subsys_id]); As

Re: [PATCH 08/23] cgroup: pass around cgroup_subsys_state instead of cgroup in subsystem methods

2013-08-01 Thread Li Zefan
@@ -4199,12 +4208,13 @@ static void init_cgroup_css(struct cgroup_subsys_state *css, /* invoke -css_online() on a new CSS and mark it online if successful */ static int online_css(struct cgroup_subsys *ss, struct cgroup *cgrp) { + struct cgroup_subsys_state *css =