From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daisuke Nishimura Subject: Re: [PATCH 4/4] swapcgroup: modify vm_swap_full for cgroup Date: Thu, 22 May 2008 21:22:05 +0900 Message-ID: <4835656D.4020706@mxp.nes.nec.co.jp> References: <48350F15.9070007@mxp.nes.nec.co.jp> <48351120.6000800@mxp.nes.nec.co.jp> <20080522165322.F516.KOSAKI.MOTOHIRO@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080522165322.F516.KOSAKI.MOTOHIRO-+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: KOSAKI Motohiro Cc: Lee Schermerhorn , Rik van Riel , YAMAMOTO Takashi , Linux MM , Linux Containers , Hugh Dickins , Balbir Singh , Pavel Emelyanov List-Id: containers.vger.kernel.org Hi, On 2008/05/22 17:00 +0900, KOSAKI Motohiro wrote: > Hi, > >> +#ifndef CONFIG_CGROUP_SWAP_RES_CTLR >> /* Swap 50% full? Release swapcache more aggressively.. */ >> -#define vm_swap_full() (nr_swap_pages*2 < total_swap_pages) >> +#define vm_swap_full(page) (nr_swap_pages*2 < total_swap_pages) >> +#else >> +#define vm_swap_full(page) swap_cgroup_vm_swap_full(page) >> +#endif > > I'd prefer #ifdef rather than #ifndef. > > so... > > #ifdef CONFIG_CGROUP_SWAP_RES_CTLR > your definition > #else > original definition > #endif > OK. I'll change it. > and vm_swap_full() isn't page granularity operation. > this is memory(or swap) cgroup operation. > > this argument is slightly odd. > But what callers of vm_swap_full() know is page, not mem_cgroup. I don't want to add to callers something like: pc = get_page_cgroup(page); mem = pc->mem_cgroup; vm_swap_full(mem); Thanks, Daisuke Nishimura.