Re: [PATCH] memcg: use ID in page_cgroup

From: Daisuke Nishimura
Date: Mon Aug 23 2010 - 21:18:57 EST


> > > @@ -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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/