Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753534AbZFAFOA (ORCPT ); Mon, 1 Jun 2009 01:14:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751661AbZFAFNw (ORCPT ); Mon, 1 Jun 2009 01:13:52 -0400 Received: from TYO201.gate.nec.co.jp ([202.32.8.193]:49263 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751311AbZFAFNw (ORCPT ); Mon, 1 Jun 2009 01:13:52 -0400 Date: Mon, 1 Jun 2009 14:01:02 +0900 From: Daisuke Nishimura To: balbir@linux.vnet.ibm.com Cc: KAMEZAWA Hiroyuki , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton , "lizf@cn.fujitsu.com" , "menage@google.com" , KOSAKI Motohiro , Daisuke Nishimura Subject: Re: [RFC] Low overhead patches for the memory cgroup controller (v2) Message-Id: <20090601140102.c55bdf03.nishimura@mxp.nes.nec.co.jp> In-Reply-To: <20090601132505.2fe9c870.nishimura@mxp.nes.nec.co.jp> References: <20090517041543.GA5156@balbir.in.ibm.com> <20090601132505.2fe9c870.nishimura@mxp.nes.nec.co.jp> Organization: NEC Soft, Ltd. X-Mailer: Sylpheed 2.6.0 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1109 Lines: 41 > > @@ -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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/