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 2F2816B0088 for ; Mon, 10 Jan 2011 04:05:12 -0500 (EST) Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp08.in.ibm.com (8.14.4/8.13.1) with ESMTP id p0A8IjjL015425 for ; Mon, 10 Jan 2011 13:48:45 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0A956X23559638 for ; Mon, 10 Jan 2011 14:35:07 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0A955G6015216 for ; Mon, 10 Jan 2011 14:35:06 +0530 Date: Mon, 10 Jan 2011 14:35:03 +0530 From: Balbir Singh Subject: Re: [BUGFIX][PATCH v4] memcg: fix memory migration of shmem swapcache Message-ID: <20110110090503.GD2613@balbir.in.ibm.com> Reply-To: balbir@linux.vnet.ibm.com References: <20110105130020.e2a854e4.nishimura@mxp.nes.nec.co.jp> <20110105115840.GD4654@cmpxchg.org> <20110106100923.24b1dd12.nishimura@mxp.nes.nec.co.jp> <20110106123415.895d6dfc.nishimura@mxp.nes.nec.co.jp> <20110106054200.GG3722@balbir.in.ibm.com> <20110106152911.db6c5b2c.nishimura@mxp.nes.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20110106152911.db6c5b2c.nishimura@mxp.nes.nec.co.jp> Sender: owner-linux-mm@kvack.org To: Daisuke Nishimura Cc: Minchan Kim , Johannes Weiner , Andrew Morton , KAMEZAWA Hiroyuki , LKML , linux-mm List-ID: * nishimura@mxp.nes.nec.co.jp [2011-01-06 15:29:11]: > > Sorry for nit-picking but succeed is not as good as succeeded, > > successful, successful_migration or migration_ok > > > OK, I use "migration_ok". > > === > From: Daisuke Nishimura > > In current implimentation, mem_cgroup_end_migration() decides whether the page > migration has succeeded or not by checking "oldpage->mapping". > > But if we are tring to migrate a shmem swapcache, the page->mapping of it is > NULL from the begining, so the check would be invalid. > As a result, mem_cgroup_end_migration() assumes the migration has succeeded > even if it's not, so "newpage" would be freed while it's not uncharged. > > This patch fixes it by passing mem_cgroup_end_migration() the result of the > page migration. > > Signed-off-by: Daisuke Nishimura > Reviewed-by: Minchan Kim > Acked-by: KAMEZAWA Hiroyuki Acked-by: Balbir Singh -- Three Cheers, 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/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org