Messages in this thread | | | Date | Tue, 24 Aug 2010 10:14:25 +0900 | From | Daisuke Nishimura <> | Subject | Re: [PATCH] memcg: use ID in page_cgroup |
| |
> > > @@ -723,6 +729,11 @@ static inline bool mem_cgroup_is_root(st > > > return (mem == root_mem_cgroup); > > > } > > > > > > +static inline bool mem_cgroup_is_rootid(unsigned short id) > > > +{ > > > + return (id == 1); > > > +} > > > + > > It might be better to add > > > > BUG_ON(newid->id != 1) > > > > in cgroup.c::cgroup_init_idr(). > > > > Why ?? > Just to make sure that the root css has id==1. mem_cgroup_is_rootid() make use of the fact. I'm sorry if I miss something.
Thanks, Daisuke Nishimura.
| |