Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-19 Thread Tejun Heo
On Fri, Jun 19, 2015 at 11:18:48AM +0200, Michal Hocko wrote: > On Thu 18-06-15 13:49:30, Tejun Heo wrote: > [...] > > > I have tried to compile with !CONFIG_MEMCG and !CONFIG_CGROUP_WRITEBACK > > > without mem_cgroup_root_css defined for this configuration and > > > mm/backing-dev.c compiles just

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-19 Thread Michal Hocko
On Thu 18-06-15 13:49:30, Tejun Heo wrote: [...] > > I have tried to compile with !CONFIG_MEMCG and !CONFIG_CGROUP_WRITEBACK > > without mem_cgroup_root_css defined for this configuration and > > mm/backing-dev.c compiles just fine. So maybe we should get rid of it > > rather than have a

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-19 Thread Michal Hocko
On Thu 18-06-15 13:49:30, Tejun Heo wrote: [...] I have tried to compile with !CONFIG_MEMCG and !CONFIG_CGROUP_WRITEBACK without mem_cgroup_root_css defined for this configuration and mm/backing-dev.c compiles just fine. So maybe we should get rid of it rather than have a potentially

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-19 Thread Tejun Heo
On Fri, Jun 19, 2015 at 11:18:48AM +0200, Michal Hocko wrote: On Thu 18-06-15 13:49:30, Tejun Heo wrote: [...] I have tried to compile with !CONFIG_MEMCG and !CONFIG_CGROUP_WRITEBACK without mem_cgroup_root_css defined for this configuration and mm/backing-dev.c compiles just fine. So

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-18 Thread Tejun Heo
Hello, Michal. On Thu, Jun 18, 2015 at 01:12:27PM +0200, Michal Hocko wrote: ... > I see and yes, it makes some sense. I just think we can get rid of the > accessor functions when the struct mem_cgroup is visible and the code > can simply do &{page->}mem_cgroup->css. As long as the accessors are

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-18 Thread Michal Hocko
On Wed 17-06-15 14:25:00, Tejun Heo wrote: > Hey, Michal. > > On Wed, Jun 17, 2015 at 04:56:42PM +0200, Michal Hocko wrote: > > On Fri 22-05-15 17:13:20, Tejun Heo wrote: > > > Add global mem_cgroup_root_css which points to the root memcg css. > > > > Is there any reason to using css rather than

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-18 Thread Michal Hocko
On Wed 17-06-15 14:25:00, Tejun Heo wrote: Hey, Michal. On Wed, Jun 17, 2015 at 04:56:42PM +0200, Michal Hocko wrote: On Fri 22-05-15 17:13:20, Tejun Heo wrote: Add global mem_cgroup_root_css which points to the root memcg css. Is there any reason to using css rather than mem_cgroup

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-18 Thread Tejun Heo
Hello, Michal. On Thu, Jun 18, 2015 at 01:12:27PM +0200, Michal Hocko wrote: ... I see and yes, it makes some sense. I just think we can get rid of the accessor functions when the struct mem_cgroup is visible and the code can simply do {page-}mem_cgroup-css. As long as the accessors are

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-17 Thread Tejun Heo
Hey, Michal. On Wed, Jun 17, 2015 at 04:56:42PM +0200, Michal Hocko wrote: > On Fri 22-05-15 17:13:20, Tejun Heo wrote: > > Add global mem_cgroup_root_css which points to the root memcg css. > > Is there any reason to using css rather than mem_cgroup other than the > structure is not visible

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-17 Thread Michal Hocko
On Fri 22-05-15 17:13:20, Tejun Heo wrote: > Add global mem_cgroup_root_css which points to the root memcg css. Is there any reason to using css rather than mem_cgroup other than the structure is not visible outside of memcontrol.c? Because I have a patchset which exports it. It is not merged yet

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-17 Thread Tejun Heo
Hey, Michal. On Wed, Jun 17, 2015 at 04:56:42PM +0200, Michal Hocko wrote: On Fri 22-05-15 17:13:20, Tejun Heo wrote: Add global mem_cgroup_root_css which points to the root memcg css. Is there any reason to using css rather than mem_cgroup other than the structure is not visible outside

Re: [PATCH 06/51] memcg: add mem_cgroup_root_css

2015-06-17 Thread Michal Hocko
On Fri 22-05-15 17:13:20, Tejun Heo wrote: Add global mem_cgroup_root_css which points to the root memcg css. Is there any reason to using css rather than mem_cgroup other than the structure is not visible outside of memcontrol.c? Because I have a patchset which exports it. It is not merged yet

[PATCH 06/51] memcg: add mem_cgroup_root_css

2015-05-22 Thread Tejun Heo
Add global mem_cgroup_root_css which points to the root memcg css. This will be used by cgroup writeback support. If memcg is disabled, it's defined as ERR_PTR(-EINVAL). Signed-off-by: Tejun Heo Cc: Johannes Weiner aCc: Michal Hocko --- include/linux/memcontrol.h | 4 mm/memcontrol.c

[PATCH 06/51] memcg: add mem_cgroup_root_css

2015-05-22 Thread Tejun Heo
Add global mem_cgroup_root_css which points to the root memcg css. This will be used by cgroup writeback support. If memcg is disabled, it's defined as ERR_PTR(-EINVAL). Signed-off-by: Tejun Heo t...@kernel.org Cc: Johannes Weiner han...@cmpxchg.org aCc: Michal Hocko mho...@suse.cz ---