From: yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org (YAMAMOTO Takashi) Subject: Re: Re: [RFC/PATCH] cgroup swap subsystem Date: Thu, 13 Mar 2008 07:57:40 +0900 (JST) Message-ID: <20080312225740.315FD1E703E@siro.lan> References: <6197904.1204808216900.kamezawa.hiroyu@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Your message of "Thu, 6 Mar 2008 21:56:56 +0900 (JST)" <6197904.1204808216900.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org, hugh-DTz5qymZ9yRBDgjK7y7TUQ@public.gmane.org, xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org, balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org List-Id: containers.vger.kernel.org > >> At first look, remembering mm struct is not very good. > >> Remembering swap controller itself is better. > > > >The swap_cgroup when the page(and page_cgroup) is allocated and > >the swap_cgroup when the page is going to be swapped out may be > >different by swap_cgroup_move_task(), so I think swap_cgroup > >to be charged should be determined at the point of swapout. > > > Accounting swap against an entity which allocs anon memory is > not strange. Problem here is move_task itself. > Now, charges against anon is not moved when a task which uses it > is moved. please fix this behavior first if you think this is > problematic. > > But, finally, a daemon driven by process event connector > determines the group before process starts using anon. It's > doubtful that it's worth to add complicated/costly ones. > > > Thanks, > -Kame doesn't PEC work asynchronously and allows processes to use anonymous memory before being moved by the daemon? YAMAMOTO Takashi