Re: [RFC] Low overhead patches for the memory cgroup controller(v2)

From: Daisuke Nishimura
Date: Mon Jun 01 2009 - 01:14:04 EST


> > @@ -1114,9 +1125,24 @@ static void __mem_cgroup_commit_charge(struct mem_cgroup *mem,
> > css_put(&mem->css);
> > return;
> > }
> > +
> > pc->mem_cgroup = mem;
> > smp_wmb();
> > - pc->flags = pcg_default_flags[ctype];
> > + switch (ctype) {
> > + case MEM_CGROUP_CHARGE_TYPE_CACHE:
> > + case MEM_CGROUP_CHARGE_TYPE_SHMEM:
> > + SetPageCgroupCache(pc);
> > + SetPageCgroupUsed(pc);
> > + break;
> > + case MEM_CGROUP_CHARGE_TYPE_MAPPED:
> > + SetPageCgroupUsed(pc);
> > + break;
> > + default:
> > + break;
> > + }
> > +
> > + if (mem == root_mem_cgroup)
> > + SetPageCgroupRoot(pc);
> >
> > mem_cgroup_charge_statistics(mem, pc, true);
> >
> Shouldn't we set PCG_LOCK ?
> unlock_page_cgroup() will be called after this.
>
Ah, lock_page_cgroup() has already set it.
please ignore this comment.

Sorry for noise.

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/