From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753989Ab0HXBSy (ORCPT ); Mon, 23 Aug 2010 21:18:54 -0400 Received: from TYO201.gate.nec.co.jp ([202.32.8.193]:39684 "EHLO tyo201.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125Ab0HXBSu (ORCPT ); Mon, 23 Aug 2010 21:18:50 -0400 Date: Tue, 24 Aug 2010 10:14:25 +0900 From: Daisuke Nishimura To: KAMEZAWA Hiroyuki Cc: linux-mm@kvack.org, "balbir@linux.vnet.ibm.com" , gthelen@google.com, m-ikeda@ds.jp.nec.com, "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , kamezawa.hiroyuki@gmail.com, Daisuke Nishimura Subject: Re: [PATCH] memcg: use ID in page_cgroup Message-Id: <20100824101425.2dc25773.nishimura@mxp.nes.nec.co.jp> In-Reply-To: <20100824085243.8dd3c8de.kamezawa.hiroyu@jp.fujitsu.com> References: <20100820185552.426ff12e.kamezawa.hiroyu@jp.fujitsu.com> <20100820190132.43684862.kamezawa.hiroyu@jp.fujitsu.com> <20100823143237.b7822ffc.nishimura@mxp.nes.nec.co.jp> <20100824085243.8dd3c8de.kamezawa.hiroyu@jp.fujitsu.com> X-Mailer: Sylpheed 3.0.3 (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 > > > @@ -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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id 3090560080F for ; Mon, 23 Aug 2010 21:21:21 -0400 (EDT) Date: Tue, 24 Aug 2010 10:14:25 +0900 From: Daisuke Nishimura Subject: Re: [PATCH] memcg: use ID in page_cgroup Message-Id: <20100824101425.2dc25773.nishimura@mxp.nes.nec.co.jp> In-Reply-To: <20100824085243.8dd3c8de.kamezawa.hiroyu@jp.fujitsu.com> References: <20100820185552.426ff12e.kamezawa.hiroyu@jp.fujitsu.com> <20100820190132.43684862.kamezawa.hiroyu@jp.fujitsu.com> <20100823143237.b7822ffc.nishimura@mxp.nes.nec.co.jp> <20100824085243.8dd3c8de.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: KAMEZAWA Hiroyuki Cc: linux-mm@kvack.org, "balbir@linux.vnet.ibm.com" , gthelen@google.com, m-ikeda@ds.jp.nec.com, "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , kamezawa.hiroyuki@gmail.com, Daisuke Nishimura List-ID: > > > @@ -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, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org