Messages in this thread | | | Date | Mon, 1 Jun 2009 14:01:02 +0900 | From | Daisuke Nishimura <> | Subject | Re: [RFC] Low overhead patches for the memory cgroup controller (v2) |
| |
> > @@ -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.
| |