lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081107181303.7dd232fd.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Fri, 7 Nov 2008 18:13:03 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Daisuke Nishimura <nishimura@....nes.nec.co.jp>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
	"menage@...gle.com" <menage@...gle.com>
Subject: Re: [RFC][PATCH 2/6] memcg: handle swap cache

On Fri, 7 Nov 2008 17:53:03 +0900
Daisuke Nishimura <nishimura@....nes.nec.co.jp> wrote:

> On Wed, 5 Nov 2008 17:20:09 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com> wrote:
> > SwapCache support for memory resource controller (memcg)
> > 
> > Before mem+swap controller, memcg itself should handle SwapCache in proper way.
> > 
> > In current memcg, SwapCache is just leaked and the user can create tons of
> > SwapCache. This is a leak of account and should be handled.
> > 
> > SwapCache accounting is done as following.
> > 
> >   charge (anon)
> > 	- charged when it's mapped.
> > 	  (because of readahead, charge at add_to_swap_cache() is not sane)
> >   uncharge (anon)
> > 	- uncharged when it's dropped from swapcache and fully unmapped.
> > 	  means it's not uncharged at unmap.
> > 	  Note: delete from swap cache at swap-in is done after rmap information
> > 	        is established.
> >   charge (shmem)
> > 	- charged at swap-in. this prevents charge at add_to_page_cache().
> > 
> >   uncharge (shmem)
> > 	- uncharged when it's dropped from swapcache and not on shmem's
> > 	  radix-tree.
> > 
> >   at migration, check against 'old page' is modified to handle shmem.
> > 
> > Comparing to the old version discussed (and caused troubles), we have
> > advantages of
> >   - PCG_USED bit.
> >   - simple migrating handling.
> > 
> > So, situation is much easier than several months ago, maybe.
> > 
> > Changelog (v1) -> (v2)
> >   - use lock_page() when we handle unlocked SwapCache.
> > 
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> > 
> I tested this version under swap in/out activity with page migration/rmdir,
> and it worked w/o errors for more than 24 hours.
> 
> 	Reviewed-by: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
> 	Tested-by: Daisuke Nishimura <nishimura@....nes.nec.co.jp>
> 
Thank you!

-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ