From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with ESMTP id 2217F6B004F for ; Wed, 14 Jan 2009 08:57:00 -0500 (EST) Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.18.234]) by e23smtp01.au.ibm.com (8.13.1/8.13.1) with ESMTP id n0EDuieR027102 for ; Thu, 15 Jan 2009 00:56:44 +1100 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0EDuedm2019572 for ; Thu, 15 Jan 2009 00:56:40 +1100 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0EDtcHH005278 for ; Thu, 15 Jan 2009 00:55:38 +1100 Date: Wed, 14 Jan 2009 19:25:39 +0530 From: Balbir Singh Subject: Re: [RFC][PATCH 5/4] memcg: don't call res_counter_uncharge when obsolete Message-ID: <20090114135539.GA21516@balbir.in.ibm.com> Reply-To: balbir@linux.vnet.ibm.com References: <20090113184533.6ffd2af9.nishimura@mxp.nes.nec.co.jp> <20090114175121.275ecd59.nishimura@mxp.nes.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20090114175121.275ecd59.nishimura@mxp.nes.nec.co.jp> Sender: owner-linux-mm@kvack.org To: Daisuke Nishimura Cc: LKML , linux-mm , Andrew Morton , KAMEZAWA Hiroyuki , Pavel Emelyanov , Li Zefan , Paul Menage List-ID: * Daisuke Nishimura [2009-01-14 17:51:21]: > This is a new one. Please review. > > === > From: Daisuke Nishimura > > mem_cgroup_get ensures that the memcg that has been got can be accessed > even after the directory has been removed, but it doesn't ensure that parents > of it can be accessed: parents might have been freed already by rmdir. > > This causes a bug in case of use_hierarchy==1, because res_counter_uncharge > climb up the tree. > > Check if the memcg is obsolete, and don't call res_counter_uncharge when obsole. > > Signed-off-by: Daisuke Nishimura I liked the earlier, EBUSY approach that ensured that parents could not go away if children exist. IMHO, the code has gotten too complex and has too many corner cases. Time to revisit it. -- Balbir -- 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