]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
memcg: atomic ops for page_cgroup->flags
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Sun, 19 Oct 2008 03:28:11 +0000 (20:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Oct 2008 15:52:39 +0000 (08:52 -0700)
commitc05555b572921c464d064d9267f7f7bc06d424fa
tree48d4dbc315eeb4c851c6c484ef75bc816360d510
parentaddb9efebb2ee2202d324e75b593b39868528f68
memcg: atomic ops for page_cgroup->flags

This patch makes page_cgroup->flags to be atomic_ops and define functions
(and macros) to access it.

Before trying to modify memory resource controller, this atomic operation
on flags is necessary.  Most of flags in this patch is for LRU and modfied
under mz->lru_lock but we'll add another flags which is not for LRU soon.
For example, we'll place LOCK bit on flags field.  We need atomic
operation to modify LRU bit without LOCK.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c