Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761357AbYF0MZo (ORCPT ); Fri, 27 Jun 2008 08:25:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754994AbYF0MZd (ORCPT ); Fri, 27 Jun 2008 08:25:33 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:47971 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754638AbYF0MZc (ORCPT ); Fri, 27 Jun 2008 08:25:32 -0400 From: kamezawa.hiroyu@jp.fujitsu.com Message-ID: <11849640.1214569478380.kamezawa.hiroyu@jp.fujitsu.com> Date: Fri, 27 Jun 2008 21:24:38 +0900 (JST) To: Daisuke Nishimura Subject: Re: Re: [-mm][PATCH 8/10] fix shmem page migration incorrectness on memcgroup Cc: KAMEZAWA Hiroyuki , MinChan Kim , KOSAKI Motohiro , LKML , linux-mm , Andrew Morton , Lee Schermerhorn , Rik van Riel In-Reply-To: <20080627182952.f8d2b0c3.nishimura@mxp.nes.nec.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: @nifty Webmail 2.0 References: <20080627182952.f8d2b0c3.nishimura@mxp.nes.nec.co.jp> <20080625190750.D864.KOSAKI.MOTOHIRO@jp.fujitsu.com> <28c262360806262208i6791d67at446f7323ded16206@mail.gmail.com> <20080627142950.7A83.KOSAKI.MOTOHIRO@jp.fujitsu.com> <28c262360806270057w2b2d3e56ob4dde9aacf42327b@mail.gmail.com> <20080627175201.cbe86a06.kamezawa.hiroyu@jp.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1063 Lines: 35 ----- Original Message ----- >> But situation is a bit complicated. >> - shmem's page is charged as file-cache. >> - shmem's swap cache is still charged by mem_cgroup_cache_charge() because >> it's implicitly (to memcg) converted to swap cache. >> - anon's swap cache is charged by mem_cgroup_uncharge_cache_page() >> >I'm sorry if I misunderstand something. > >I think anon's swap cache is: > >- charged by nowhere as "cache". yes. > If anon pages are also on swap cache, charges for them remain charged > even when mem_cgroup_uncharge_page() is called, because it checks PG_swapca che. > So, as a result, anon's swap cache is charged. yes. >- uncharged by memcgroup_uncharge_page() in __delete_from_swap_cache() > after clearing PG_swapcache. > >right? > You're right. Sorry for confusion. Thanks, -Kame -- 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/