memcg: avoid use cmpxchg in swap cgroup maintainance
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Mon, 15 Mar 2010 04:34:57 +0000 (00:34 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Mar 2010 01:43:47 +0000 (18:43 -0700)
commite9e58a4ec3b1086d1ed8c915311aef1ae55454fd
treea500ec01cce13fa17f2400ac57f4ad36f4d37bca
parenta3d3203e4bb40f253b1541e310dc0f9305be7c84
memcg: avoid use cmpxchg in swap cgroup maintainance

swap_cgroup uses 2bytes data and uses cmpxchg in a new operation.  2byte
cmpxchg/xchg is not available on some archs.  This patch replaces
cmpxchg/xchg with operations under lock.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reported-by: Sachin Sant <sachinp@in.ibm.com> wrote:
Acked-by: Balbir Singh <balbir@in.ibm.com>
Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_cgroup.c